Hello Guest it is January 28, 2020, 08:51:13 AM

Author Topic: VB Scripting Basics  (Read 4056 times)

0 Members and 1 Guest are viewing this topic.

Offline Dom

*
  •  22 22
    • View Profile
    • Bridgeport CNC Retrofit Blog
VB Scripting Basics
« 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.
Re: VB Scripting Basics
« Reply #1 on: April 14, 2010, 12:51:22 PM »
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

Offline Dom

*
  •  22 22
    • View Profile
    • Bridgeport CNC Retrofit Blog
Re: VB Scripting Basics
« Reply #2 on: April 14, 2010, 12:54:08 PM »
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!

Offline BR549

*
  •  6,925 6,925
    • View Profile
Re: VB Scripting Basics
« Reply #3 on: May 08, 2010, 09: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