Run shell commands from GUI
07 Jun 2017 19:27 - 08 Jun 2017 15:16 #94263
by Cpk_Rbt
Run shell commands from GUI was created by Cpk_Rbt
It would be great if I could add a custom button to the GUI that would execute a specific script, for special sub-routines and shell commands.
I think I can use custom M-codes M100-199 for user-defined functions, and the action could be to run a shell script, which might work just fine. I was just wondering if there was a way to do the same type of thing with a e.g. PyVCP button.
Any thoughts?
I think I can use custom M-codes M100-199 for user-defined functions, and the action could be to run a shell script, which might work just fine. I was just wondering if there was a way to do the same type of thing with a e.g. PyVCP button.
Any thoughts?
Last edit: 08 Jun 2017 15:16 by Cpk_Rbt. Reason: resolved
Please Log in or Create an account to join the conversation.
07 Jun 2017 20:52 #94267
by cmorley
Replied by cmorley on topic Run shell commands from GUI
A pyvcp button could be used to run an MDI command which could call a M command.
Chris M
Chris M
The following user(s) said Thank You: Cpk_Rbt
Please Log in or Create an account to join the conversation.
08 Jun 2017 12:15 #94290
by andypugh
Replied by andypugh on topic Run shell commands from GUI
It is easier with a GladeVCP button, the MDI-action buttons call a bit of G-code that is a property of the button. Optionally with hal-pin values substituted in.
The following user(s) said Thank You: Cpk_Rbt
Please Log in or Create an account to join the conversation.
08 Jun 2017 15:17 #94298
by Cpk_Rbt
Replied by Cpk_Rbt on topic Run shell commands from GUI
Thanks Chris and Andy for your input!
Please Log in or Create an account to join the conversation.
12 Jun 2017 13:02 #94424
by andypugh
Replied by andypugh on topic Run shell commands from GUI
Incidentally: If you want to run shell-commands directly without going through the MDI interface, you can use a normal GTK button and have the Python handler call the shell script.
Doing it this way means that it can happen at any time, whereas the MDI buttons only work when MDI mode is possible (ie, when the machine is not already running G-code).
Doing it this way means that it can happen at any time, whereas the MDI buttons only work when MDI mode is possible (ie, when the machine is not already running G-code).
Please Log in or Create an account to join the conversation.
Time to create page: 0.093 seconds