03-05-2014 02:25 PM
I'm writing some code that performs some tasks programatically by movinvg the mouse for me using the SetCursorPos function of the user32.dll
This seems to work OK except until I try to do something else manually with the mouse (my program includes some automated components and some manual ones so this is necessary). When I do something manually with the mouse, the programattic control stops working and no longer will move the mouse for me.
Is there a way for me to resume control over the mouse when I need my program to take control again? Thanks!
03-05-2014 06:05 PM
I have not had that isse before. Can you reduce your code down some (to hide the propriatary stuff) to just enough to show the problem?
03-06-2014 11:25 AM
I can try but that might be hard to do. One thing my program is doing when I automatically move the mouse is clicking on a button in another program. That's when it seems to lose the control, and I think making that other program the active window is interfering with the SetCursorPos. Is that something that could happen? Any ideas how to solve for it? Maybe I could make Labview the active window again after I click, but I'm not recalling how to do that or if it would make a difference.
Thanks for your help!