;ahk_l版 ;用于win7 ;如果是xp的话,只需要第一段,且把判断条件修改下即可 SetTitleMatchMode, RegEx GroupAdd, Explorer, ahk_class CabinetWClass GroupAdd, Explorer, ahk_class ExploreWClass GroupAdd, desktop, ahk_class Progman GroupAdd, desktop, ahk_class WorkerW WaitTime := DllCall("GetDoubleClickTime")/1000 ComObjError(0) return #IfWinActive, ahk_group desktop ~LButton:: KeyWait,LButton KeyWait, LButton, d T%WaitTime% If ! Errorlevel { MouseGetPos,,,,myCtrl,1 ControlGet, selected, List, Selected Col1, %myCtrl%, A if !selected Run notepad.exe } Return #IfWinActive, ahk_group Explorer ~LButton:: KeyWait,LButton KeyWait, LButton, d T%WaitTime% If ! Errorlevel { selected:=ShellFolder() if !selected Run notepad.exe } Return #IfWinActive ShellFolder(hWnd=0) { If hWnd || (hWnd := WinExist("ahk_class (?:Cabinet|Explore)WClass")) { For window in ComObjCreate("Shell.Application").Windows doc := window.document Until (window.hWnd = hWnd) sFolder := doc.folder.self.path, sFocus := doc.focuseditem.name For item in doc.selecteditems sSelect .= (!sSelect ? "" : "`n") item.name Return sSelect } }