Aracknid Posted October 10, 2006 Share Posted October 10, 2006 Hi, I wrote a script on my system, and it works perfectly fine. I compiled it and ran it on my system, and it still works perfectly fine. I moved it to a different system, and it fails on the WinWaitActive line in the sample below. I used classname to avoid hardcoding English text, since it may be different in other languages. Anyway, when I changed it from classname to the actual English title, it worked fine on both systems. So, in order to get it to work on the second system using classname, is there something I must include in the script or is there some dependency on a particular file that this other system doesn't have? Both systems are Windows 2003. However, the one on which it fails has no service packs installed. The one I developed on has SP1. Is SP1 on Windows 2003 a requirement? Note that I'm using AutoIt 3.2.0.1 Sample code that fails on second machine (LogError is a function I wrote to log errors to a file): Opt("WinTitleMatchMode",4) if WinWaitActive("ClassName=#32770",,60)=0 then LogError("Could not attach to dialog") exit endif Sample code that works on second machine (Only difference is not using ClassName, using actual English title): Opt("WinTitleMatchMode",4) if WinWaitActive("Browse",,60)=0 then LogError("Could not attach to dialog") exit endif Thanks, Aracknid. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 10, 2006 Moderators Share Posted October 10, 2006 The 2nd parameter is a syntax errorWinWaitActive("ClassName=#32770",,60) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Aracknid Posted October 10, 2006 Author Share Posted October 10, 2006 (edited) Sorry, my mistake. I was typing this in from memory. I actually do have the null string as the second parameter. As I said, it works on one system, not the other. I should also add that I am clicking a button to get the dialog to appear before this piece of code. Opt("WinTitleMatchMode",4) if WinWaitActive("ClassName=#32770","",60)=0 then LogError("Could not attach to dialog") exit endif Thanks, Aracknid. Edited October 10, 2006 by Aracknid Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now