531,658 active members*
3,203 visitors online*
Register for free
Results 1 to 5 of 5
  1. #1

    Linking Button to Custom Script


    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,

  2. #2
    Join Date
    Mar 2017

    Re: Linking Button to Custom Script

    Assign number to your script.
    Attached Thumbnails Attached Thumbnails Clipboard01.png  

  3. #3

    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
    Join Date
    Jun 2017

    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

    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.

Similar Threads

  1. Accidentally deleted script code from set Z button...help?
    By canman77 in forum Mach Software (ArtSoft software)
    Replies: 3
    Last Post: 09-12-2018, 05:57 AM
    By cvetan in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 03-11-2016, 10:20 PM
  3. How to attach C# script to a screen button ??
    By Beefy in forum UCCNC Control Software
    Replies: 5
    Last Post: 08-31-2015, 02:37 AM
  4. Edit button script
    By dukedunham in forum Mach Mill
    Replies: 4
    Last Post: 01-25-2015, 01:28 AM
  5. Easiest way to make button run VB script
    By adamchapman in forum Mach Software (ArtSoft software)
    Replies: 9
    Last Post: 08-16-2010, 08:38 PM

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