Hello Guest it is April 16, 2024, 07:50:28 PM

Author Topic: how can I access a button-action from script?  (Read 1264 times)

0 Members and 1 Guest are viewing this topic.

how can I access a button-action from script?
« on: April 27, 2017, 11:30:21 AM »
Hello,

when I look at the events-page of a pushbutton (i.e. GCode open file), then I see an action name, which is localized.
How can I find out the function, that is behind the action name?

Currently I want to combine the actions of 2 pushbuttons, which both have an attached action for "left up" trigger.
One is "gcode file open" and the other is "gcode file close" - as I realized, that I can not load a gcode file, when there is already a gcode file loaded.
I don't like that behaviour, therefore I want to trigger a close gcode file, each time I load a gcode file.

I read the scripting manual for mach4, but did not find any help

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: how can I access a button-action from script?
« Reply #1 on: April 27, 2017, 12:01:32 PM »
The Load GCode Action will already close any open gcode and toolpath thenload the new gcode and recreate the toolpath, so no other programming is required.

DazTheGas
New For 2022 - Instagram: dazthegas
Re: how can I access a button-action from script?
« Reply #2 on: April 27, 2017, 11:24:39 PM »
Ah ok, that must be new in the developer release. Thanks for your reply.
When I tried it with the 3233 nothing happened on reload - I had to close the file before.
So its ok for the moment. May be I come back to the real question later.

By the way: loading files with non-ascii-character in filename fails with "file not found".