Hello Guest it is March 29, 2024, 04:30:37 AM

Author Topic: Button Script - Question  (Read 3259 times)

0 Members and 1 Guest are viewing this topic.

Offline mhdale

*
  •  130 130
  • Knowledge is the Treasure.
    • View Profile
    • Black Dragon Technologies
Button Script - Question
« on: April 03, 2007, 09:11:28 PM »
I am building a screen for a custom machine, I was wondering if there was some function or syntax which allows me to tell within the button script if the button is being held down? i.e. I push a button which runs this script and will continue to run the script untill I release the button. I have looked through the Customize documetation and cant seem to find anything relevant. Also is there a way to set wheter the button toggles or is momentary, I noticed that the text buttons toggle and the graphic ones seem to be momentary..... am I delusional?

Mike
Re: Button Script - Question
« Reply #1 on: April 04, 2007, 07:51:44 PM »
There is no way to do that- Mach wont actually start the VB code until the button is released, as is true of all windows buttons. Try clicking on a button, then dragging the mouse off before you release it.  YOu willnot do the buttons function.

ron ginger
Re: Button Script - Question
« Reply #2 on: April 05, 2007, 12:53:24 AM »
actually, Ron, thats not entirely true.
press the buttons in mach and they activate before releasing them. just tried it myself.

Chuck

Offline mhdale

*
  •  130 130
  • Knowledge is the Treasure.
    • View Profile
    • Black Dragon Technologies
Re: Button Script - Question
« Reply #3 on: April 05, 2007, 11:53:08 AM »
Actually experience has taught me there is always a way..... just perhaps not the way you want. My programming skills have atrophied and are more than a few years out of date, but I do know that you can program visual basic and C++ to do something when a button is released as well and depressed, I am not sure how Mach is setup to deal with them. It is not critical but it would make the screen controls for this bizzaro machine I am building more intuitive....

Mike