Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 12:46:00 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  VB Scripting Basics
Pages: 1   Go Down
Print
Author Topic: VB Scripting Basics  (Read 982 times)
0 Members and 1 Guest are viewing this topic.
Dom
Active Member

Offline Offline

Posts: 22


View Profile WWW
« on: April 14, 2010, 10: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.
Logged
elpablito
Active Member

Offline Offline

Posts: 122


View Profile
« Reply #1 on: April 14, 2010, 11:51:22 AM »

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
Logged
Dom
Active Member

Offline Offline

Posts: 22


View Profile WWW
« Reply #2 on: April 14, 2010, 11:54:08 AM »

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!
Logged
BR549
Active Member

Offline Offline

Posts: 2,551


View Profile
« Reply #3 on: May 08, 2010, 08:27:56 PM »

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
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!