I've started using Windows 7 and switched over to Autohotkey_L at the same time. I'm having some trouble. Is there a way to get the current folder and list of selected files from an open explorer window when pressing a hotkey. Thanks.
GP
Autohotkey_L and Windows Explorer
Started by
Puzzled Greatly
, Nov 27 2010 08:37 AM
5 replies to this topic
#1
-
Posted 27 November 2010 - 08:37 AM
Read the clipboard documentation
#2
-
Posted 27 November 2010 - 09:02 AM
Thanks for the reply., Sorry, I should have specified without using the clipboard. I know how to do that. Is there not a cleaner method? This is the kind of code I had working before:
GroupAdd, Explore, ahk_class CabinetWClass GroupAdd, Explore, ahk_class ExploreWClass #IfWinActive ahk_group Explore { explorerClass = ExploreWClass space:: ; Get current path in Explorer WinGetClass explorerClass, A ControlGetText currentPath, Edit1, ahk_class %explorerClass% ControlGet, selectedFile, List, Selected Col1, SysListView321,ahk_class %explorerClass% msgbox %currentPath%\%selectedFile% }
#3
-
Posted 27 November 2010 - 11:37 AM
COM can be used to access any Explorer windows that are open. You may use jethrow's post as a starting point. (Check the links, and note that Item.HWND can be compared to WinActive("A") to find the active window.)
#4
-
Posted 27 November 2010 - 11:53 AM
And just a few posts below yours <!-- m -->http://www.autohotke...pic.php?t=65419<!-- m -->
#5
-
Posted 27 November 2010 - 12:06 PM
Thanks for the link. I couldn't work out how to use Item.HWND. I'd appreciate some more help. I looked at Item.LocationURL but that seems a very messy way to get a regular path. I'm finding this much more difficult than I imagined.COM can be used to access any Explorer windows that are open. You may use jethrow's post as a starting point. (Check the links, and note that Item.HWND can be compared to WinActive("A") to find the active window.)
#6
-
Posted 27 November 2010 - 07:45 PM