before proceeding on to some other jobs.
The following code has some rigorous checking stages that make sure Windows Explorer is active and ready.
Code: Select all
#e::
RunWait, Explorer.exe
Sleep 300 ; is there an alternative to this?
IfWinExist ahk_class CabinetWClass
{
Winactivate ahk_class CabinetWClass
WinWaitActive ahk_class CabinetWClass
if ErrorLevel
{
MsgBox, WinWait timed out.
return
}
ifWinactive ahk_class CabinetWClass
{
msgbox windows explorer is up and ready!
}
return
}
Also, is there a way to replace the sleep command? Perhaps with a timed loop?
Any tips & hints are welcome.