09-15-2010 01:10 AM - edited 09-15-2010 01:13 AM
Just starting using autoit and most window control commands work great but I cannot get WINSETONTOP AND WINSETSTATE functions to work. All looks good but keeps showing missing terminal wiring. I checked to see if I could change write, but not available. Also tried using properties SW_SHOWMAXIMIZED and SW_MAXIMIZE. I have attached the Labview 10 code and hopefully a snop shot here. Can someone send me a working example or provide details as to what the problem may be.
Thanks!
Shannon
Solved! Go to Solution.
09-15-2010 09:57 AM
I have used AutoIt in the past and have posted a few examples. One thing I noticed about your code is that you do not have the "strTitle" parameter of the Invoke node wired. You have it on the other ones, though. Also, I don't know if this is still true with the current version of AutoIt, but one thing I discovered is that with methods that took in strings I had to wire an empty string to the input if it wasn't being used. So, for those methods where you are not using one of the string inputs (such as "strText") try wiring an empty string constant.
09-15-2010 04:02 PM
Yes, StrTitle must be wired—had tried that and many other things, but not shown in my last attempt which is what I posted. That must be wired too!
As far as StrText, it show OPTIONAL for
WinWait, WinActivate, WinWaitActivate (defined at http://www.autoitscript.com/autoit3/docs/functions/WinActivate.htm , for example)
But NOT WinSetState or WinSetOnTop (ones I was having problem with.
(http://www.autoitscript.com/autoit3/docs/functions/WinSetState.htm , for example shows StrText = The text of the window to affect. I am not sure what that means, exactly.
Have tried, empty string, nothing yet...Fixes wire error but window doesn’t maximize, I am using “32” as input because the WinGetState function returns that value for maximized, however, maybe this is wrong; I cannot find anything specify input for WinSetState (not sure why).
Am playing around with properties also. I will post when I get it figured out.
Thanks for your help and time!
09-15-2010 04:18 PM - edited 09-15-2010 04:19 PM
Got it.
You were right, needed to wire empty charac set to StrTxt to get rid of the wire error. Use property node as shown. Not sure if this is how it is supposed to be coded but it is the only thing that has worked so far.
StrTxt is optional for others I am using.
This seems to work fine.
01-26-2012 12:11 PM
Does this work from an exe?? I had a similar vi that controls a DOS program outside of Labview. Using Auto It I can send input the DOS window no problem but when I build everything into the exe it doesn't work. I can't activate the window for some reason. Did you have that problem?
01-27-2012 11:53 AM
Hi nelg87,
Can you describe what exactly you are trying to do with the DOS windows? Is this executable being run on the same machine you are developing on? My guess is that the ActiveX object is not being found from the executable because the path is not linked in the project build. I'll try to look into if this can be specified.
Brian