09/04/11 09:37:44 e4COaq2Q0
>>625
「変数」は何処に存在するんだろうか?
; 起動毎にホットキーのOn/Offがトグルになるスクリプト
OnExit, OnExitSub
IniRead, IsHotkeyEnable, conf.ini, Hotkey, Enable, 0 ; 無ければ "0(=Off)"とする
If (IsHotkeyEnable) {
Hotkey, IfWinActive, ahk_class Progman ; デスクトップのみ
Hotkey, #1, Key1, On
Hotkey, #2, Key2, On
}
return
; 終了時にフラグを逆転して終了
OnExitSub:
IsHotkeyEnable := !IsHotkeyEnable
IniWrite, %IsHotkeyEnable%, conf.ini, Hotkey, Enable
ExitApp
Key1:
MsgBox, Key1 Action
return
Key2:
MsgBox, Key2 Action
return