Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
about QM3 Some suggestions
#31
That is a very old Roslynpad version that uses a long died .NET version, can't even run on my computer. Now it requires SDK.
#32
Ver 14 for .Net 4.x
I downloaded and started version 17, but upon startup, the following window popped up, indicating the need to install .NET 7 SDK.

[Image: 7.png]
#33
I found the following command-line tools for reference. I am not very proficient in programming. Wink

https://fsprojects.github.io/Paket/installation.html
https://fsprojects.github.io/Paket/editor-support.html

Regarding the issue of memory usage, I used the following free tool and instantly reduced memory usage to within 4MB.
https://www.sordum.org/9197/reduce-memory-v1-6/
[Image: ac.png]
#34
#11. Many public and popular websites have examples of REST or HTTP requests in CURL format.
It would be convenient if there is a function or feature available in LA, that can convert CURL request code into LA code
similar to the functionality provided in the link below
https://tools.chilkat.io/curl
#35
about #11

I found an online website that can achieve the goal, but it doesn't use the functions in LA, instead it uses generic functions in C#.
https://curl.iculture.cc/csharp/
#36
You can use whatever in LA. The automation library just has several functions to make it easier, but you don't have to use them.

For example ChatGPT or Bard probably will not give you LA-specific code. Better even don't ask. Ask for C# code.
#37
I just asked Bard
Quote:please convert this curl command to C#: curl example.com

And it gave this code with comments:
Code:
Copy      Help
using System.Net.Http;

namespace CurlToCsharp
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create a new HttpClient instance.
            HttpClient client = new HttpClient();

            // Create a new HttpUriRequest instance and set the URL.
            HttpUriRequest request = new HttpRequestMessage(HttpMethod.Get, "https://example.com");

            // Execute the request and get the response.
            HttpResponseMessage response = client.SendAsync(request).Result;

            // Check the response code.
            if (response.StatusCode == HttpStatusCode.OK)
            {
                // The request was successful.
                Console.WriteLine("The request was successful.");
            }
            else
            {
                // The request failed.
                Console.WriteLine("The request failed.");
            }
        }
    }
}

It seems correct.
#38
Thank you for sharing.
I have tested with ChatGPT and found that it provides correct answers for some C# code.
However, I still believe that there might be more concise and elegant implementation methods in LA Wink .
#39
#12
Add a menu item to the Run menu, which runs the selected code. Hotkey: F8.
#40
#13
What is the simplest way to modify the content of the cookbook? I would like to translate the comments in the article.(My English is not very good, and I would like to use Google Translate to localize the articles.)
[Image: a.png]

I downloaded the source code from GitHub and dragged it into my workspace, but the order of the articles got mixed up.
[Image: 7.png]

It would be great to add a context menu item to the cookbook that allows editing/locking the content of the articles.
#41
The simplest way to translate a recipe:
Right-click in recipe text and select 'Open in web browser'.
Translate the web page.
You can create a script to automate it.

I don't remember in which version was added the context menu with command 'Open in web browser'. If unavailable, maybe that LA version is still not released.

-----------
Quote:I downloaded the source code from GitHub and dragged it into my workspace, but the order of the articles got mixed up.
Drag-drop the 'Cookbook' folder, and open as workspace or import as workspace. But probably it isn't the best way to modify cookbook content.

LibreAutomate gets cookbook content from file 'Cookbook.db'. It's a SQLite database. Also applies some regex to the text. Then separates code from comments. Replaces the file when installing new program version.

If want to translate recipes directly in LA, maybe the best way is to write a LA extension script that translates and replaces comments in Recipe panel. Not easy.
#42
Quote:Right-click in recipe text and select 'Open in web browser'.

The effect of using Google Translate plugin in the browser is not very good. I wanted to use ChatGPT to translate it, and I tried it. The results were very good. I now rarely use Google Translate. 

Suggestion: If possible, make the code editing control in the Recipe panel editable and savable. This would make the operation very simple, allowing users to directly add and save their own favorite code.

Additionally, is it possible to provide offline version documentation in CHM format for the LA library? I would also like to use ChatGPT to translate it. Smile
In some cases where internet access is not available, having an offline version of the library documentation would be very useful. It would greatly increase efficiency for viewing the documentation.
#43
CHM - no, too much work.

Look for a browser extension "translate web page using AI". If does not exist, will be created in near future.
#44
#14 

The cursor is positioned within a function. When I press F12, the function definition will be opened using ILSpy. 
https://github.com/icsharpcode/ILSpy
 Below is a demonstration of operations in LP7
[Image: a.gif]

When I press Ctrl+F12, the following window pops up.
[Image: 7.png]
#45
#14. Too much work.
 
Quote:When I press Ctrl+F12, the following window pops up.
In LA 0.17 that F12 window is significantly improved.
#46
#15 Add an example in coolbook that demonstrates calling Python code using the python.net component.

The pythonnet component is faster, has a higher version, and better compatibility compared to the ironpython component.

I have tried the following code, and it can be executed successfully with the correct result. However, it is not elegant and convenient.

I want to use the following method to call the function, but I do not have enough programming skills to achieve the goal Smile (The conversion of various data types between C# and Python, difficult to understand.)

Python.NET configuration and further references.
https://somegenericdev.medium.com/callin...d45f7d5232
https://pythonnet.github.io/pythonnet/dotnet.html
#47
https://www.libreautomate.com/forum/show...5#pid36975
#48
#16

Mark the text color of unused variables as gray for better visibility.
[Image: a.gif]
Can I set the background color of the current line? Like below.
[Image: 45.gif]

#17
add an automatic backup feature similar to QM(can select which directories' files to package and compress)?
Additionally, add a checkbox where I can specify a script to execute after the backup, for example, I can upload the backup using my FTP script.
[Image: 789.png]
#49
#18
Great, LA is becoming more powerful and now supports debug execution. I have some suggestions:
1. When debugging, automatically hide the panel on the right temporarily, as indicated by the red rectangle in the following image.

2. After executing the code below, some non-English characters printed to the output panel appear as garbled text, as indicated by the black arrow in the image.
https://i.ibb.co/7VLZ4cV/err.png
other places
https://i.ibb.co/Rz2M80m/ac.png

3.The font size of the text in the menu bar seems a bit small. Increasing the font size a bit would be more suitable.
https://i.ibb.co/x5BqfCV/b.png
 
Code:
Copy      Help
// script ""
//.
script.setup(trayIcon: true, sleepExit: true);
//..

using var c = new consoleProcess("cmd");
c.Write("wmic logicaldisk where \"VolumeName='C'\" assoc:value /RESULTCLASS:Win32_DiskPartition | findstr /i \"diskindex\"");
var a = c.Prompt("C:*>", "exit");
print.it(a);

#19
In the new version of LA, when using F2 for renaming, the input method's suggestion text is not positioned below the cursor insertion point but rather at the top-left corner of the screen. This issue was not present in the previous old versions, and it also displays correctly in QM.

https://i.ibb.co/tBCf36s/c.png
#50
#20
How to display the items that have already been translated in the cookbook tab?
In the old version of LA, the cookbook existed in folders, while in the new version, it exists in the cookbook.db file.
#51
#21
The icons for each project suddenly disappeared. Reinstalling the software and rebuilding the system icon cache did not have any effect
https://i.ibb.co/j35H3Z4/ico.png

The upgrade button is not functioning
https://i.ibb.co/C6NRGJw/ver.png
#52
Quote:The upgrade button is not functioning
Fixed, now it will show 1.0.1. Don't need to reinstall LA.
Quote:The icons for each project suddenly disappeared.
Normally it happens when the file disappears. I never saw icons disappearing in other cases.
Try menu Tools -> Icons -> Set file icon -> File -> Script files -> Default.
#53
When I opened the customize dialog, the icon suddenly returned to normal (I didn't do anything)
-----------------------
Also, now many of the outputs of the functions are displaying garbled characters in the output panel, Like #18.2 , which did not occur in the old version of LA
#54
Please give some examples of code that produces garbled text.

Which LA version was the last version without these problems?

Which Windows version?
#55
I forgot which version it was, but it should be around 2022. I remember seeing normal text output before.

win10 ltsc1909 chinese ver

GIF demo:
https://i.ibb.co/wSS6nJF/ccc.gif

Code:
Copy      Help
// script ""
//.
script.setup(trayIcon: true, sleepExit: true);
//..

using var c = new consoleProcess("cmd");
c.Write("wmic logicaldisk where \"VolumeName='C'\" assoc:value /RESULTCLASS:Win32_DiskPartition | findstr /i \"diskindex\"");
var a = c.Prompt("C:*>", "exit");
print.it(a);

I use Code Font name: Microsoft YaHei Mono
#56
The change that causes it: now LA console functions use UTF-8 encoding by default. Because most newer console programs use it. But some old console programs still use a non-Unicode encoding. Then need to specify encoding.

Code:
Copy      Help
// script ""
using var c = new consoleProcess("cmd") { Encoding = Console.OutputEncoding };
c.Write("wmic logicaldisk");
var a = c.Prompt("C:*>", "exit");
print.it(a);
#57
thank you, You're right, the code works very well
#58
The output messages from many places appear to be garbled to me.
https://i.ibb.co/VTJx5cX/err.png
#59
Nuget output will be correct in next LA version.
#60
Quote:#19
In the new version of LA, when using F2 for renaming, the input method's suggestion text is not positioned below the cursor insertion point but rather at the top-left corner of the screen.

Will be fixed, thank you.

-----------
Quote:When debugging, automatically hide the panel on the right temporarily, as indicated by the red rectangle in the following image.

Maybe will add "panel events" options like "When showing/hiding panel P1, hide/show panels P3, P5...".


Forum Jump:


Users browsing this thread: 3 Guest(s)