Guest rathore Posted March 23, 2004 Posted March 23, 2004 How do i find out the classname (not handle) of the active window? Thanx. -Rathore
Administrators Jon Posted March 23, 2004 Administrators Posted March 23, 2004 The AutoIt Window Spy shows this information along with the title.
Guest rathore Posted March 23, 2004 Posted March 23, 2004 i'm sorry i should've been more clear. i want to do this in a script. like every explorer window has a different title (depending on the folder open) but has the same classname. i wanted to check if the active window is an explorer window ( classnames CabinetWClass or ExploreWClass) thanx!
Administrators Jon Posted March 23, 2004 Administrators Posted March 23, 2004 There probably should be a WinGetClass function but you can work around it by doing something like: If WinActive("classname=CabinetWClass") Then ... specified class is active ... EndIf
Guest rathore Posted March 23, 2004 Posted March 23, 2004 uh Jon, does that really work? this is what i tried: sleep (2000) If WinActive("classname=CabinetWClass") Then TrayTip ( "yes", "it works!",1) sleep (1000) Else EndIf in the initial delay i'd manually activate a folder window... but nothing happened! is it something that i'm doing wrong?
Administrators Jon Posted March 23, 2004 Administrators Posted March 23, 2004 I figured that as you were already talking about classnames that you know you must put AutoIt into the mode that understands those? Opt("WinTitleMatchMode", 4)
Guest rathore Posted March 23, 2004 Posted March 23, 2004 (edited) GOD! u r really a FastShooter Jon! I did come online just to post that I found out what I missed: AutoItSetOption ( "WinTitleMatchMode", 4 ) ( look at the time! just 3 mins after my post u've answered it!!) Thanx!!! Edited March 23, 2004 by rathore
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