Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: django013 on April 27, 2017, 11:30:21 AM

Title: how can I access a button-action from script?
Post by: django013 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
Title: Re: how can I access a button-action from script?
Post by: DazTheGas 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
Title: Re: how can I access a button-action from script?
Post by: django013 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".