Jump to content

Can't get window class to work


Recommended Posts

I'm at a complete loss. I can't get window class to work, at all. Example:

WinActivate("[CLASS:Notepad]")

Doesn't bring notepad window forward. Whichever scripts I've ever written, window class name never worked for me. AutoIT 3.3.8.1; Windows 7. I think I even had the same issue in WinXP.

What can be the problem?

-----------------------

Hmm... I don't know... works half of the time. Maybe Im just making errors in scripts. I better withdraw my question until I have more details. It could be my mistake. Pardon me for the inconvenience.

Edited by supraspecies
Link to comment
Share on other sites

I assume it's supposed to write "window found !"? If so, then no (and I've checked - I don't have any instances of Notepad running). But I figured out why my CLASS wasn't working - the application was changing class name every launch. I didn't even know that was possible. How would I get around that? I doubt I can use wildcards in class names, so what would be a workaround? In the class name:

CltWin:400000:8:10003:0:97605e5

only the last segment changes, this one:

97605e5

So I would like to identify the window by everything that comes before.

Update: Oh, apparently I can just enter a part of a class name using REGEXPCLASS, and that'll be it. Simpler than I thought.

Edited by supraspecies
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

×
×
  • Create New...