Machsupport Forum
Mach Discussion => VB and the development of wizards => Topic started by: Dom on April 14, 2010, 11:03:34 AM
-
Please could someone help me with the code to make a button that only produces an action whilst the button is being pressed?
I have made custom buttons that will toggle, pressing once to turn on an output and a second time to turn off an output but what I really need a button that works like the jog buttons and will only enable an output whilst it is pressed and turns off the output the moment the button is released.
-
Thats easy to do when making your screen in flash. Dont know if can be done with traditional screens
on (press) {
fscommand ("VBMacro","Button down script");
}``
on (release)`{
fscommand ("VBMacro","Button release script");
}
What screen/screen designer are you using?
If you are not using a custom screen maybe you can modify the flash mach nation to fix your needs
Regards
Pablo
-
I'm using the standard mach3 screen, modified with a few extra buttons i've added using the reccomended machscreen screen designer program. I wouldnt know where to begin with flash!
-
You can set up a simple BRAIN that monitors the DO button AND
If it is ON then produce and action
IF it is OFF then cancell the action
Hope that helps