# win = ahk.active_window # 获取活动窗口 # win = ahk.win_get(title='Untitled - Notepad') # 按标题获得窗口 # win = list(ahk.windows()) # 所有Windows列表 # win = Window(ahk, ahk_id='0xabc123') # 又id号码获得窗口 # win = Window.from_mouse_position(ahk) # 这是从你执行脚本是...
PixelGetColor, color, %MouseX%, %MouseY%, RGB ;获得x,y处RGB颜色,0xRRGGBB格式ToolTip, %color% ;光标处提示sleep,5000ToolTipreturn 菜鸟小小浪 简洁主义 12 高端 玉女教吹箫 火狐吧宠 9 代替IETab 的脚本#IfWinActive ahk_class MozillaWindowClass;判断FF是否活动,使按键的操作只在firefox下生效!
ToolTip(info.title" window closed") SetTimer(ToolTip,-3000) } } } lastOpenWindows:=currentOpenWindows ListOpenWindows(){;ReturnsMapwherekey=window handleandvalue={title,class,processName} openWindows:=Map() forhwndinWinGetList() tryopenWindows[hwnd]:={title:WinGetTitle(hwnd),class:WinGetClass(...
#IfWinActive #c::MsgBox You pressed Win-C while any window except Notepad is active. #If MouseIsOver("ahk_class Shell_TrayWnd") WheelUp::Send {Volume_Up} ; 在任务栏上滚动滚轮:增加/减小音量。 WheelDown::Send {Volume_Down} ; 自定义组合键及其他特性 通过在两个按键 (不包括操纵杆按钮) ...
通过ControlGetFocus,var语句获取当前焦点所在控件,如果控件名为SysListView321或者DirectUIHWND3,就说明是不需要输入文字的集合B,可以执行单键热键。 #If WinActive("ahk_class CabinetWClass") or WinActive("ahk_class ExploreWClass") ;{………我的电脑/资源管理器 d:: ControlGetFocus,var if var in SysLi...
WinGet IDVar,ID,A ; Get ID from Active window.从激活窗口获得窗口ID This.ID:=IDVar ; Set IDVar to This.ID将ID设置为IDVar } Activate();Activates window with Title - This.Title { ;MsgBox % This.ID WinActivate % "ahk_id "This.ID ;Use word "This" when you reffer to variable of ...
MouseGetPos, , , winId ; get window under mouse pointer if (autohide_%winId%) { ; window is on the list of 'autohide' windows if (hidden_%winId%) { ; window is in 'hidden' position previousActiveWindow := WinExist("A")
WinGetActiveTitle, Title ; 获取当前活动窗口的标题,赋值给 Title IfInString, Title, Firefox ; 判断 Title 中是否含有 Firefox ,无论我们打开什么网页,这个是永远不变的,你也可以试试用类名来判断。文末会介绍怎么获得一个窗口的类名。 { send ^w ...
WinGet, Style, Style, My Window Title if (Style & 0x8000000) ; 0x8000000 表示 WS_DISABLED 274、检测一个窗口是否具有置顶样式? WinGet, ExStyle, ExStyle, My Window Title if (ExStyle & 0x8) ; 0x8 表示 WS_EX_TOPMOST. 275、激活当前窗口并获得位置、大小信息? WinGetActiveStats, Title, ...
mouse_position # Returns a tuple of mouse coordinates (x, y) (relative to active window) ahk.get_mouse_position(coord_mode='Screen') # get coordinates relative to the screen ahk.mouse_move(100, 100, speed=10, relative=True) # Moves the mouse reletave to the current position ahk.mouse...