CoordMode, Mouse, Screen ;~ 桌面Progman|WorkerW GroupAdd, Desktop, ahk_class ExploreWClass GroupAdd, Desktop, ahk_class WorkerW WaitTime := DllCall("GetDoubleClickTime")/1000 ;屏幕左上 x1:=0 y1:=0 ;任务栏高度 WinGetPos,,, h,ahk_class Shell_TrayWnd ;屏幕右下 x2:=A_ScreenWidth y2:=A_...
ControlGet,class,Hwnd,,SysListView321,ahk_class WorkerW If DllCall("IsWindowVisible", UInt,class) WinHide, ahk_id%class% Else WinShow, ahk_id%class% }
以文件夹(资源管理器)为例,其可能有ahk_class CabinetWClass、ahk_class ExploreWClass、ahk_class Progman、ahk_class WorkerW等不同窗口标识,注意区分。通过ControlGetFocus,var语句获取当前焦点所在控件,如果控件名为SysListView321或者DirectUIHWND3,就说明是不需要输入文字的集合B,可以执行单键热键。
Return IfWinActive ahk_class WorkerW;如果是桌面的话则不移动 Return Loop{GetKeyState,mState,xbutton2,PifmState=U{ToolTipbreak}SysGet,ScreenWidth,61MouseGetPos,mX,mY SetWinDelay,-1if(wY0+mY-mY0)<0{;如果到移动到顶部就不移动if(mX)<ScreenWidth{;如果移动到扩展屏则不限制移动 WinMove,ahk_id%...
;---在桌面双击鼠标左键 显示一段时间桌面图标---#HotIfWinExist("ahk_class WorkerW")orWinExist("ahk_class Progman")~LButton::{DoubleClickTime:=200;双击最大间隔时间,单位毫秒 WinShowTime:=3000;图标显示时间,单位毫秒if(ThisHotkey=A_PriorHotkey&&A_TimeSincePriorHotkey<DoubleClickTime){MouseGet...
#IfWinActive ahk_class CabinetWClass +Enter:: ;open file with Paint/Notepad (open folder in new window) #IfWinActive ahk_class ExploreWClass +Enter:: #IfWinActive ahk_class Progman +Enter:: #IfWinActive ahk_class WorkerW +Enter::
ahk_class WorkerW ;激活右下角的任务栏 WinWait, ahk_class WorkerW ;可能任务栏还没睡醒,我再等等 PixelSearch, x1, y1, 1078, 997, 1919, 1079, 0x127503, 10, FAST RGB ;像素寻找指令,不懂参数的看帮助文档,0x127503这个颜色我是用spy在u盘图标显示那里获取的,有点绿绿的 ;~ MouseMove, %x1%, %y...
SwitchDesktopIcons(){HWND:=ControlGetHwnd("SysListView321","ahk_class WorkerW")if(DllCall("IsWindowVisible","UInt",HWND)==0){WinShow("ahk_id"HWND)}else{WinHide("ahk_id"HWND)}} Windows11 22H2 可以正常使用 ©著作权归作者所有,转载或内容合作请联系作者 ...
WinGetClass, class, ahk_id %id% ;获得窗口ID对应的窗口类 if((class = "Shell_TrayWnd") or (class = "WorkerW")) { send, {Volume_Up} } else { send, {WheelUp} } Return WheelDown:: CoordMode,Mouse,Screen ;全局获取模式 MouseGetPos, , , id, ;获得指针指向窗口的ID ...
GroupAdd, ccc, ahk_class WorkerW GroupAdd, ccc, ahk_class #32770 ; 主界面网址补齐、runhistory #ifwinactive 后不能接变量 GroupAdd, AppMainWindow,%AppTitle% GroupAdd, ExplorerGroup, ahk_class CabinetWClass GroupAdd, ExplorerGroup, ahk_class ExploreWClass GroupAdd, DesktopGroup, ahk_class...