Linking Button to Custom Script

Results 1 to 5 of 5

Thread: Linking Button to Custom Script

  1. #1
    Member ScorpionTDL's Avatar
    Join Date
    Aug 2020
    Posts
    131
    Downloads
    0
    Uploads
    0

    Default 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:


  2. #2
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1304
    Downloads
    0
    Uploads
    0

    Default Re: Linking Button to Custom Script

    Assign number to your script.

    Attached Thumbnails Attached Thumbnails Linking Button to Custom Script-clipboard01-png  


  3. #3
    Member ScorpionTDL's Avatar
    Join Date
    Aug 2020
    Posts
    131
    Downloads
    0
    Uploads
    0

    Default 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 ;-)



  4. #4
    Member theRat's Avatar
    Join Date
    Jun 2017
    Location
    Australia
    Posts
    143
    Downloads
    0
    Uploads
    0

    Default 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"






  5. #5
    Member ScorpionTDL's Avatar
    Join Date
    Aug 2020
    Posts
    131
    Downloads
    0
    Uploads
    0

    Default 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.



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Linking Button to Custom Script

Linking Button to Custom Script