目次
使い方
参考:
ウィンドウを指定する
付属ツールの Window Spy でウィンドウの実行ファイル名を調べる。#IfWinActive
の第一引数に ahk_exe
と実行ファイル名を指定する。ウィンドウの指定を解除するには引数なしの #IfWinActive
を記述する。
#IfWinActive, ahk_exe chrome.exe ^,::Send !fs ; Open Chrome Settings #IfWinActive
参考:
ウィンドウ/ソフトごとに動作を変える | 生焼けプログラマーの雑記帳
WinTitle & Last Found Window | AutoHotkey [Official]
ウィンドウの位置/サイズを変更する
参考:
AutoHotkey で、Window 位置変更 | あんにんにっき。
Create a Hotkey to Resize Windows to a Specific Size with AutoHotkey | How-To Geek
ウィンドウを切り替える
参考:
Using AutoHotkey to switch Virtual Desktops in Windows 10 | Computer Hope
Custom shortcut to switch to next/previous desktop in Windows 10 – Super User
make Win+Tab act as Alt+Tab, but remap all other Win+ combinations as Ctrl+ – Stack Overflow
Sending L/RWin down and up commands to trigger Win-key combinations – AutoHotkey Community
ウィンドウのレイアウトを変更する
参考:
Window Positioning with AutoHotkey | Damir’s Corner
アクティブウィンドウを判別する
- IfWinActive
- IfWinNotActive
- #IfWinActive
参考:
特定ウィンドウ上のみで任意キーで指定処理させる方法 | サイトアフィリ専業への道
IfWinActive / IfWinNotActive | AutoHotkey Wiki
#IfWinActive / #IfWinExist | AutoHotkey Wiki
#IfWinActive / #IfWinExist | AutoHotkeyJp
Autohotkey doesn’t check if statement condition – Stack Overflow
アクティブウィンドウを取得する
- WinActive
参考:
ウィンドウが存在するかどうか判別する
- #IfWinExist
- IfWinExist
- IfWinNotExist
参考:
#IfWinActive / #IfWinExist | AutoHotkey Wiki
#IfWinActive / #IfWinExist | AutoHotkeyJp
IfWinExist / IfWinNotExist | AutoHotkey Wiki
WinExist() / IfWinExist | AutoHotkey [Official]
script to monitor changes to a window title – Stack Overflow
ウィンドウのハンドルを取得する
- WinExist
参考:
WinExist() / IfWinExist | AutoHotkey [Official]
ウィンドウの情報を取得する
形式
- ID
- IDLast
- PID
- ProcessName
- ProcessPath
- Count
- List
- ControlList
- ControlListHWND
- MinMax
- Tranparent
- TransColor
- Syle
- ExStyle
参考:
WinGet | AutoHotkey [Official]
WinWait
参考:
WinWaitActive
参考:
WinWaitActive / WinWaitNotActive | AutoHotkey Wiki
Run script on active window change – AutoHotkey Community
SetTitleMatchMode
参考:
SetTitleMatchMode | AutoHotkey [Official]
SetTitleMatchMode RegEx applied only to directives – AutoHotkey Community