https://autohotkey.com/boards/viewtopic.php?t=31755
There is a bit of code that is really interesting to me.
This snippet correctly sees each Explorer window, but what I want to know is how I then get a handle on each window to perform an AutoHotkey command on them.
e.g. Say I have 4 explorer window, and the for window in ComObj loop goes through them.
With the first explorer window captured, I want to do something, like WinMinimize or WinActivate, how is that done?
Code: Select all
q:: ;get the path for folders/special folders/Control Panel items
for window in ComObjCreate("Shell.Application").Windows
try MsgBox % window.Document.Folder.Self.Path
return
Code: Select all
q:: ;get the path for folders/special folders/Control Panel items
for window in ComObjCreate("Shell.Application").Windows
try MsgBox % window.Document.Folder.Self.Path
WinActivate
return