Jump to content

ClassName=#32770 not working on all systems?


 Share

Recommended Posts

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

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 by Aracknid
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...