09-22-2008 02:07 AM
Hi all,
I am new to labview.I want to run an exe which will link to program NI h/w.There was already a s/w build to generator and analyzers manually I am able to provide some I/p settings in generator and see the o/p from analyses through that s/w(exe).I am also able to automate that now.But i am stuck as initially I need to call a other exe(GUI) developed in c#, Before starting that s/w.So i wanted to know how the other exe(GUI) can be called(Hope System exec.vi will call that exe) But then i need to automate mouse clicks on that exe(GUI).Is there anyway to dump all controls from exe(GUI) to labview such that we can automate from labview side.
09-24-2008 12:55 AM
Hi BobbyQA,
I don't know of a "generic" way to interface with "objects" on the GUI of an arbitrary EXE. Here are a couple of options - there are probably more .
- use a Macro Recorder to automate GUI functions, and invoke the recorded macros from LabVIEW
- use the Windows API (from LabVIEW) to position the mouse and perform clicks and send keyboard data.
tst posted a simple mouse-move example here. (watch mouse jump after you click the run button.)
- More Windows API
It was my experience that references to an application's text-boxes were often accessible, by starting with just the name of the Application Window and "mining" its components. If a text-box is accessible this way, it's a more reliable way to automate text update, compared with positioning the mouse, and clicking. To be reliable, automated mouse-positioning approaches need to account for, or control, screen resolution, window positions, application "state", the number of windows open, the top-most window, etc.![]()
This could be a lot of work compared to editing the C# code to build a DLL or .NET interface. ![]()
Cheers!
09-24-2008 03:28 AM
Hi,
Thanx for your suggestion.But I have already similar tool to automate the process and its commercial.Its not like labview where you can bundle into an exe.As i told you for an exe which controls NI h/w.There was related labview VI also.So i thought we can easily link an exe to VI.If i misunderstood sorry.
Anyway there was another way for me where i can communicate through RS 232 which will directly changes the board settings instead of mousle clicks through GUI.But always i am getting reset message from that board.I am not able to write anything into board.So that i can acknowledge the response.If you help in that case na it would be too good.Is there any particular syntax? for writing to serial port.It saya IDN\n..etc..soemthing my msg would be in Hex code.Please help me out.An example would be a great help.
Thanks & Regards
BobbyQA09-24-2008 07:53 AM
11-24-2008 05:04 AM
I am sorry for late reply but Auto It capture any control of a GUI??Assume its not a button it might be a image can it click that by seeing data on it??
Let me make it clear with an example
TEXT is a image on GUI which on click will show some data beside it.Noramlly if button properties are used for creating on GUI it will be found out by any tool.
But this is a image which contains data TEXT.Is this can be traced in Auto It