I've run into a few issues with this script:
If WinExists ("[CLASS:CabinetWClass]", "Address: C:\Users\Dad\Downloads") Then
WinActivate ("[CLASS:CabinetWClass]", "Address: C:\Users\Dad\Downloads")
Else
Run("Explorer.exe" & "C:\Users\Dad\Downloads")
Endif
If I have a subdirectory of Downloads open, like C:\Users\Dad\Downloads\Pictures, it will focus that window rather than continuing to the Else statement.
If there are no Windows Explorer windows open, the system just beeps at me, and the script closes. I picked up my code in the answers here: https://www.autoitscript.com/forum/topic/30600-open-folder-with-autoit/ .
I tried to tag this for the Run()
function and text
parameter.