2010-12-09 28 views
4

我試圖做一個AutoHotkey的宏,在Windows資源管理器僅是積極的,但我不知道瀏覽器的Windows 7中的名字,我試過如下:AutoHotKey:#IfWinActive。* Explorer *。 ?在Windows 7中

;Make explorer understand that Ctrl+L means goto location bar (like Firefox/Chrome) 
#IfWinActive .* Explorer *. 
    ^l::Send {F4} 
#IfWinActive 

任何想法?

+0

這個問題可能屬於superuser.com – Ither 2010-12-09 18:43:08

+0

啊。我不知道那件事。謝謝。我會在那裏問我以下的問題。 – Ola 2010-12-09 19:31:27

回答

11

Autohotkey附帶一個名爲Window Spy的程序。您可以使用它來發現活動窗口的標題。

另外,請注意ahk_class(在幫助文件中查找ahk_class),它使用窗口的類型而不是標題。 例如,在我的Win 7的情況下,我可以限制熱鍵通過指定資源管理器:

#IfWinActive ahk_class CabinetWClass 
3

Windows資源管理器似乎在不同時間使用不同的窗口類(例如,如果搜索是顯示或不 - 至少在Win XP中)。該腳本兩類我見過的匹配和映射按Ctrl - 大號「專注地址欄」(ALA火狐)在資源管理器:

#IfWinActive ahk_class ExploreWClass 
^L:: 
#IfWinActive ahk_class CabinetWClass 
^L:: 
    Send {F6} 
return 
#IfWinActive