11-10-2008 06:10 PM
11-11-2008 08:58 AM
Richjoh, the Wireless Test Manager (WTM) software from Agilent has several variables that need controls in the automation, hence a simple autokey script wouldn't suffice as I'd be required to change it quite often.
smercurio_fc, I installed the new autoIt, and initially, everything was working fine. I took care of the controlclick node as well. However, after closing labview, and restarting it, I encountered the same error. The error always occurs in WTMRun. I highlighted the execution and the error at WinExists said this: Error code 1, Incorrect function in WTM Run.vi
I reselected the function at the invoke node again, but to no avail, I still get these errors, which still leads me to believe that for some reason, the reference inputted into the subVI WTM Run is not the same as before.
Also, the reason I have so many local variables was to avoid having too many wires crossing on top of each others. Is it really a disadvantage to use local variables?
11-11-2008 09:18 AM
11-11-2008 09:45 AM
richjoh wrote:
Much much easier to setup and use AutoHotKey.
How so? The packages seem somewhat equivalent to me, as far as basic functionality is concerned. Both have an installer. Both have functions to control windows. Both have functions to activate buttons, send keystrokes, etc. There is, though, one major difference. AutoHotKey doesn't have a built-in ActiveX interface, and the COM library for AutoHotKey seems to have been cobbled together as an afterthought.
Back to the main problem:
Yes, those values should be the same. It makes no sense to me that they're not the same. Try this simple test: Place the WinExists node in your main VI. Make sure you wire an empty string to the strText input or you will get an error.
As for your question regarding local variables: Using local variables to avoid having too many wires cross is not a good reason to use local variables. If not used properly they can (and often do) lead to race conditions. Local variables have their use. Yours is not one of them. ![]()
Additional code comments:
11-11-2008 03:59 PM
smercurio_fc, it seems like that's done the trick. Looks like it had more to do with the empty strings that I was inputting. Before I was only inputting the "empty string constants" into terminals that required and input. Now i've started putting in those same empty string constants into the ones that don't require an input and seems to work fine now. I've also followed your advice and replaced my local variables to just wires from the source ![]()
I am in the process of making the loop changes you have suggested. Further, yes the software does have a .NET interface, but it became too difficult due to a lack of a proper programming guide from the software itself. Hence I had no way of seeing what function I should call or intialize or create an object from, etc. I also emailed Agilent and asked to get a programmer's guide, but they refused saying the function names were strictly for Agilent developer's. So I figured for the time being, to have some automation working, I went the way of Auto-It. But it would be nice to have the function calls of the WTM directly available on labview
11-11-2008 05:29 PM - edited 11-11-2008 05:31 PM
Yes I have to spell it out, the point is to not use ActiveX (my personal preferance) but if you must be all means .... USE AutoIt. Seems to work fine for your project. Happy coding. 🙂
I've work around ActiveX b4 and will do so in the future when possible to keep the coding simple as possible.