Page 1 of 1

WinActivate not triggering on normal IfWinExist

Posted: 20 Apr 2021, 18:38
by milkygirl90
I want #e to activate the last-used windows explorer window if available, else open dropbox. However, the script below activates dropbox in windows explorer if not available, even though I have other explorer windows open in other directories.

Any idea why?

Code: Select all

				 #e::
If WinExist, ahk_class CabinetWClass
WinActivate, ahk_class CabinetWClass		 
							 Else 
							   Run, % Drive . ":\Dropbox"
							   		 				 RETURN

Re: WinActivate not triggering on normal IfWinExist

Posted: 20 Apr 2021, 18:54
by mikeyww
See proper syntax: WinExist, example #1.

Re: WinActivate not triggering on normal IfWinExist

Posted: 20 Apr 2021, 20:03
by milkygirl90
mikeyww wrote:
20 Apr 2021, 18:54
See proper syntax: WinExist, example #1.
ah! thanks!