LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

external GUI Manipulation

Solved!
Go to solution
Hi guys.  I'm faily new to LabView, and I have to manipulate a GUI that was created using Auto-it.  The GUI itself is an automation software, but requires data entry, and mouse clicks.  Apart from that, the users also want to be able to alter the GUI itself (e.g. add a text box on the main interface).  Is there a way LabView can do this?
0 Kudos
Message 1 of 26
(4,466 Views)

Hmm...

 

If you add a new text box to your GUI it will have no functionality?! What schold happen with this text box? 

0 Kudos
Message 2 of 26
(4,463 Views)

msharma wrote:
Is there a way LabView can do this?

AutoIt has an ActiveX interface, so you can control AutoIt in the same way as the text-based scripts. Do a search on this forum and you'll find a couple of examples that I've posted. If you don't know how to use ActiveX with LabVIEW, you should read over this document: ActiveX and LabVIEW.

Message 3 of 26
(4,442 Views)

hey so a little change of plans.  Some of the details were really iffy.  What they meant was to manipulate one of Agilent's test softwares in order to run tests for 2-3 days, without any human interaction.  Ideally, we're looking at simulating mouse clicks, opening dialog boxes, selecting certain criteria, etc.  From what I've heard, LabView has the ability to do this. 

 

Would these methods be available using the ActiveX library of LabView?  I'm assuming that since Auto-it was able to automate the Agilent System, LabView shouldn't have any problems either.... 

0 Kudos
Message 4 of 26
(4,437 Views)

LabVIEW has no direct means of automating another piece of software, just like C/C++ has no direct means of automating another piece of software. If this piece of software has an ActiveX interface (or .NET) then you can control it using ActiveX (or .NET). The VSA software from Agilent, for example, has an ActiveX interface so you can automate it that way. I know, because we do that in our lab here. Do you know if this software has an ActiveX or .NET interface?

 

If the software does not have an ActiveX/.NET  interface, then you must use the Windows API to simulate mouse clicks or keyboard. This requires using the Windows API.

Message 5 of 26
(4,400 Views)

"msharma" <x@no.email> wrote in message
news:1222454407718-783614@exchange.ni.com...
> From what I've heard, LabView has the ability to do this.&nbsp;
&nbsp;Would these methods be available using the ActiveX library of
LabView?&nbsp; I'm assuming that since Auto-it was able to automate the
Agilent System,&nbsp;LabView shouldn't have any problems either....&nbsp;

It's not so much that LabVIEW has this capability. Windows has this
capability, and LabVIEW can use it. Like you already said, you can simulate
mouse and keyboard clicks, in several ways. You should use the SendMessage
function, since it's the most elegant and fool proof way to do it. It's also
difficult to implement, although it depends on the application you are
trying to control.

Each control is probably a window. This isn't always the case, e.g. LabVIEW
uses it's own controls, so the controls are not windows (as recognised by
the OS). Autoit probably does use OS windows for it's controls. You need to
find the hWnd's of these controls (use FindWindow(Ex)), and use the hWnd and
SendMessage to send the correct event and data to the control.

Seaching for FindWindow should result in a few post about it. OpenG probably
has tools for it too.

Regards,

Wiebe.


0 Kudos
Message 6 of 26
(4,361 Views)
Hey thanks for all the help guys.  So the Agilent test software is the exact same as Agilent's Wireless Test Manager (WTM), which has a .NET interface.  Would this simplify the automation, since I'm assuming Windows API wouldn't be required to automate this?  For example, now I'm thinking along the lines of invoking nodes and calling corresponding methods.   
0 Kudos
Message 7 of 26
(4,320 Views)
Since it has a .NET interface then you can call .NET properties and methods from LabVIEW using the .NET tools in LabVIEW. For more information you should read the section in the LabVIEW Help on using .NET with LabVIEW.
Message 8 of 26
(4,316 Views)

I'm running into some problems.  I'm trying to access certain methods of the Agilent WTM software by way of invoke node from the .NET interface.  However, the errors I'm receiving says that the object reference ID is NULL.  So by looking at the .NET and LabView page, I decided to create .NET objects by way of the constructor node.  The output reference of the constructor node, after I've selected my library and object, is connected to an invoke node, and then the output of that is to the close reference block.  When I run this simple design, LabView crashes on me.  What can I be doing wrong? 

 

What I should mention is that when I do select my class of .NET objects for the constructor node, there are two .NET references that require an input in the constructor node.  I'm not sure as to what I'm supposed to input at that point.  I've simply only been inputting a constant of the System.Object and System.UintPtr as the .NET references into those two inputs.  Your help will be greatly appreciated here.

 

Thanks!    

 

0 Kudos
Message 9 of 26
(4,243 Views)

Unfortunately, I don't have the WTM software so I have no idea what method you're referring to, and without the documentation I can't comment on what datatypes it's asking for.

 

As to your question "What I should mention is that when I do select my class of .NET objects for the constructor node, there are two .NET references that require an input in the constructor node." These are the parameters for the contructor. A constructor is basically a special method. This is part of object-oriented programming. If you do not know how to use .NET it would be beneficial for you to go through some .NET tutorials. 

0 Kudos
Message 10 of 26
(4,198 Views)