dwaynek Posted March 22, 2006 Posted March 22, 2006 since Windows Explorer uses a variable window title, i can't detect it with the usual WinActive, so how do i do it?
Moderators SmOke_N Posted March 22, 2006 Moderators Posted March 22, 2006 Here this works:While 1 If _ExploreWinActive() Then MsgBox(0, 'Active', 'Explorer Window Active') EndIf Sleep(10) WEnd Func _ExploreWinActive() $OPT_TitleMode = Opt('WinTitleMatchMode', 4) If WinActive('classname=ExploreWClass') Then Opt('WinTitleMatchMode', $OPT_TitleMode) Return 1 EndIf Opt('WinTitleMatchMode', $OPT_TitleMode) EndFunc 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.
MHz Posted March 23, 2006 Posted March 23, 2006 SmOke_N, Strange as my explorer windows are of Class: CabinetWClass on XP SP2 . Once I change the Class, then your code works well.
Moderators SmOke_N Posted March 23, 2006 Moderators Posted March 23, 2006 (edited) SmOke_N, Strange as my explorer windows are of Class: CabinetWClass on XP SP2 . Once I change the Class, then your code works well.Really? XP Pro SP2 here... hmmEdit: Actually now that I think about it, that doesn't surprise me. The build is old I believe (2002 if I'm not mistaken). Edited March 23, 2006 by SmOke_N 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.
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