Linking Button to Custom Script
Hi
I would like to link a Custom Script to a Button that's configured in one of the Btn*.txt files.
I know I can use
cmd: "Machine.User_Commands.UserCommand_*" "My Command"
However this seems to be a rather unstable implementation as the number of the Script seems to change when adding new User scripts that are alphabetically Proceedings the current script.
Is there a way to link a button to a script based on the filename of the script?
Best Regards,
Klaus
1 Attachment(s)
Re: Linking Button to Custom Script
Assign number to your script.
Re: Linking Button to Custom Script
Yea well, thats a workaround.
So I get that there is not other way?
Would be a nice addition to just offer the possibility to give a path & filename ;-)
Re: Linking Button to Custom Script
I start my scripts like this:
expr: "startcode('M912')" "" image="Icons/IMG_DustExtractor.svg" tooltip="Dust Extractor" imagechange="true" updatefast="true"
You can also highlight and enable/disable buttons with expressions by adding something like this to that line:
enable="AND(_hw_idle == 1,_hw_estop == 0)" updown="_dustextractor == 1"
Re: Linking Button to Custom Script
Nice, didn't know that I can just implement my own M code.
That definitely does the trick.
Thanks for the hint.