Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: multiplex on January 19, 2008, 11:03:18 PM

Title: reading mouse movement?
Post by: multiplex on January 19, 2008, 11:03:18 PM
Hello,

I have a project where i would like to monitor and analyze mouse movement from within Mach.

Is this something i can do within the scripting language? Or will i need something to pass the data into mach

Thanks for your help!  just need some direction
Title: Re: reading mouse movement?
Post by: Ron Ginger on January 29, 2008, 08:16:46 PM
I do not think its possible to detect mouse activity from within the VB script environment. The VB stuff only gets to run 10 times per second. You might be able to do something from a plugin, but that requires C++
Title: Re: reading mouse movement?
Post by: multiplex on January 29, 2008, 08:28:34 PM
thanks for your reply.

after i looked into it a bunch, i figured out that i could make function calls to DLL's directly in VB.

i used the user32.dll (i think thats what it is called) and was able to read mouse position x and y

my project is building an auto edge finder using an IBM trackpoint mouse as a pressure transducer

http://youtube.com/watch?v=3q58oVZCmB0
Title: Re: reading mouse movement?
Post by: Bodini on January 30, 2008, 10:08:56 AM
Dont miss the g31 command too.  http://www.machsupport.com/MachCustomizeWiki/index.php?title=How_to_get_Data_from_a_Probe