03-14-2011 04:30 AM
Ok. Crudely, I have started playing around with the "ControlClick" function. If I were to use "WinSetState" to maximize the window so that my button is in exactly the same place, would I just find the coordinates and then "ControlClick" to start the machine?
If this were to hypothetically work everytime, how would I then get labview to activate this script? Again sorry for so many questions on this end, but I am eager to make this work!
Thanks,
Tei
03-14-2011 02:07 PM
You can use the Invoke Node to interface with ActiveX, this is probably the most "correct" way to do it.
http://zone.ni.com/devzone/cda/tut/p/id/2983
That's a fairly non-specific reference which helped me when first getting going with ActiveX and LabVIEW.
Keep in mind, what you're describing doing is quite a workaround (assuming I understand it correctly). If you're trying to interface with a button in another program you can also manually use windows DLLs to manipulate mouse movements! This incredibly messy solution is something I've choosen to do occasionally for simplicity.
And please ask all the questions you like! The more questions/information, the faster you'll get your issue fixed (usually).
03-14-2011 02:46 PM
Hi Kevin,
Do you know of any examples that would be the 'correct' solution?
I would love a straight-forward, less messy solution but can't really seem to find one without having to completely build the driver from scratch. Unless you have another solution...
-Tei
03-14-2011 02:50 PM
Search for AutoIT. I know for a fact that there are examples here on the board and this is what I told you to do earlier. I don't have the time right now to do it for you. And maximizing the window is not at all necessary. You should be using the AutoIT window info utility to get the window title, coordinates, control name, etc.