Hello Guest it is April 19, 2024, 06:09:24 AM

Author Topic: Mouse button push-on & release-off, For an Output# in Mach button  (Read 3343 times)

0 Members and 1 Guest are viewing this topic.

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Hi, All

My VB skill's are very bad, Could someone post some VB code for a Mouse button push-on, release-off for an Output#.

Like the MPG Jog Arrows, Searched all over for something simple and concise.

The code below only allows a Click on and Click off

If IsOutputActive( OUTPUT17 ) Then
   DeActivateSignal( OUTPUT17 )
Else
   ActivateSignal( OUTPUT17 )
End If   

Just Lost Hear Thanks, Chip
Re: Mouse button push-on & release-off, For an Output# in Mach button
« Reply #1 on: November 20, 2007, 07:49:41 PM »
I dont think VB can read the mouse directly. Of course, a button can bbe set up so that when the mouse clicks on it that button will be 'pressed' and some VB code in the button can then run.

If thats what you want all you need is a button on the screen, set it to be a VB button in screen 4, then put the code you have in the button script form the Mach operator menu.

Offline Chip

*
  • *
  •  2,055 2,055
  • Gainesville Florida USA
    • View Profile
Re: Mouse button push-on & release-off, For an Output# in Mach button
« Reply #2 on: November 20, 2007, 09:46:28 PM »
Hi, Ron

Thanks for the reply, Using this in a button and a brain for 45 deg jog function, Was hopping there was some VB code for the push-on, release-off out there.

Found allot of ways with Cilck-Click, 45 Brain, Nothing fancy,  http://www.machsupport.com/forum/index.php/topic,4897.0.html

Thanks, Chip