arkypita / LaserGRBL

Laser optimized GUI for GRBL
http://lasergrbl.com
Other
1.24k stars 494 forks source link

Introduce advanced command line features for easier automation #1824

Closed otonribic closed 2 years ago

otonribic commented 2 years ago

For those among us tinkering with automation and autoprocessing, ideally doing the cutting/engraving work instead of the user would make the entire process of using LaserGRBL much more comfortable.

The most straightforward solution (even if not the easiest) that comes to mind is a more complex/advanced set of command line options, allowing adding and appending files and setting parameters. E.g., adding two files as an example (adding sugarcube.png and then appending sugar2.svg, each with its own parameters), although syntax may vary wildly depending on the implementation: LaserGRBL.exe sugarcube.png /lasermax:400 /speed:1200 /linetoline /linpermm:10 sugar2.svg /speed:600 /lasermax:750 This would allow the user (coming from another application starting LaserGRBL with these parameters) to just essentially press F12, check the contours, and start.

A more hacky method is to allow keyboard shortcuts for everything (Alt+various keys underlined in Windows) to focus various GUI elements. This would allow external apps to more or less reliably simulate keystrokes and do the same thing automatically what user needs to otherwise do manually. (To mention nothing about speeding things up for the power users ;-) )

Much appreciated

arkypita commented 2 years ago

Hi, thanks for this tip. I find this feature very useful, but the way the LaserGRBL code is done at the moment is not easy to implement. In the LaserGRBL code there is not much separation between UI code and algorithms, so the management of a command line becomes a bit complex.

HenniePeters commented 2 weeks ago

Instead of using the command line, would it be possible to run a script, started from the menu? Are you running into the same algorithm limitations then, or would that be easier to implement?

otonribic commented 1 week ago

Just FYI, how I'm currently "circumventing" it is by using mouseclick and keyboard simulation scripts (PyAutoGUI for Python) to e.g. load 50 or so files and append them over each other with various settings.

On Fri, Oct 11, 2024 at 4:42 PM Hennie Peters @.***> wrote:

Instead of using the command line, would it be possible to run a script, started from the menu? Are you running into the same algorithm limitations then, or would that be easier to implement?

— Reply to this email directly, view it on GitHub https://github.com/arkypita/LaserGRBL/issues/1824#issuecomment-2407562249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQOYSKFLDJTDCIRN7JYSW3Z27PT7AVCNFSM6AAAAABPZCFY2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGU3DEMRUHE . You are receiving this because you authored the thread.Message ID: @.***>

HenniePeters commented 1 week ago

Nice trick, but how do you know where to "click"? I guess you run laserGRBL maximised, but then does the file open dialog always open at the same location?

otonribic commented 1 week ago

On the same screen with same window position, yes it does. But for that very reason I prefer simulating keystrokes which is, of course, much more straightforward. I use "tab" strokes to move across controls, always in the same order.

On Sun, Oct 13, 2024, 11:18 AM Hennie Peters @.***> wrote:

Nice trick, but how do you know where to "click"? I guess you run laserGRBL maximised, but then does the file open dialog always open at the same location?

— Reply to this email directly, view it on GitHub https://github.com/arkypita/LaserGRBL/issues/1824#issuecomment-2408897914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQOYSJMLXRMYQZLZZ3DYITZ3I3EZAVCNFSM6AAAAABPZCFY2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYHA4TOOJRGQ . You are receiving this because you authored the thread.Message ID: @.***>