- Linking Button to Custom Script
-
Member
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
Similar Threads:
-
-
Member
-
Member
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 ;-)
-
Member
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"
-
Member
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.
- Linking Button to Custom Script
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules