Machsupport Forum

Mach Discussion => Mach Screens => Screen designer tips and tutorials => Topic started by: Phil on June 06, 2010, 06:24:23 PM

Title: Holding down a Keyboard Button or MousePress
Post by: Phil on June 06, 2010, 06:24:23 PM
I have designed my screens for an application I am working on, and need several buttons to operate relays whilst a keyboard button is held down and/or mouse click is held down. I have the screens and operate the relays using some simple VB. I can easily toggle them on and off, and all works fine.

But I need them to hold on only whilst the button is pressed or the mouse clicked - Does anyone know a way to do this with the Brains or VB or anything? I don't actually use an X Y Z axis - it could be a bodge but can the jog buttons be reused if there is no proper way to achieve what I want?

I have searched the forum and cannot find an answer although I did see similar questions posed several times.

Phil.
 ???
Title: Re: Holding down a Keyboard Button or MousePress
Post by: ger21 on June 06, 2010, 06:43:49 PM
I think you'll need to do the screen in Flash to do that. Unfortunately, there's no Flash documentation.
Title: Re: Holding down a Keyboard Button or MousePress
Post by: Phil on June 06, 2010, 06:48:13 PM
Thats a shame - me and flash don't get on!!
Title: Re: Holding down a Keyboard Button or MousePress
Post by: BR549 on June 06, 2010, 09:10:58 PM
YOu can use a keyboard key as a hotkey to do that but not a screen button
Title: Re: Holding down a Keyboard Button or MousePress
Post by: Phil on June 06, 2010, 09:26:16 PM
Really - how - do you have a link, or example within standard mach screens/profiles?
You can use a hotkey to send an output whilst the key is pressed, and then to stop when the key is not pressed -  will try that and see.
thanks