- 22
- 2
Как объединить сохранение биндов в одну кнопочку ? (Выбрал нужные бинды и сохранил по 1 кнопочке)
AutoHotKey:
#UseHook
Settimer, read, 10
IniRead, Key1, IniFile.ini, Section, Key1, % A_Space
IniRead, Key2, IniFile.ini, Section, Key2, % A_Space
IniRead, Key3, IniFile.ini, Section, Key3, % A_Space
Gui Font, s10, Impact
Gui Add, Text, x195 y10 w170 h26 +0x200 +BackgroundTrans, Start CEO.
Gui Add, Text, x195 y50 w170 h26 +0x200 +BackgroundTrans, Fast key.
Gui Add, Text, x195 y90 w170 h26 +0x200 +BackgroundTrans, Fast buy.
Gui, Show, w353 h300, GUI ver main
Gui, Add, Hotkey, x12 y9 w90 h30 vKey1, % Key1
Gui, Add, Hotkey, x12 y49 w90 h30 vKey2, % Key2
Gui, Add, Hotkey, x12 y89 w90 h30 vKey3, % Key3
Gui, Add, Button, x112 y9 w80 h30 gButton1, Запомнить
Gui, Add, Button, x112 y49 w80 h30 gButton2, Запомнить
Gui, Add, Button, x112 y89 w80 h30 gButton3, Запомнить
Button1:
Gui, Submit, NoHide
Hotkey, % PrKey1, PrKey2 off, UseErrorLevel
Hotkey, % PrKey1, PrKey2 := Key1, Key1, Key2, Key2 on, UseErrorLevel
IniWrite, % Key1, Key2, IniFile.ini, Section, Key1, Key2
Button2:
Gui, Submit, NoHide
Hotkey, % PrKey2, off, UseErrorLevel
Hotkey, % PrKey2 := Key2, Key2, on, UseErrorLevel
IniWrite, % Key2, IniFile.ini, Section, Key2
Button3:
Gui, Submit, NoHide
Hotkey, % PrKey3, off, UseErrorLevel
Hotkey, % PrKey3 := Key3, Key3, on, UseErrorLevel
IniWrite, % Key3, IniFile.ini, Section, Key3
return
read:
IniRead, Key1, IniFile.ini, Section, Key1, % A_Space
IniRead, Key2, IniFile.ini, Section, Key2, % A_Space
IniRead, Key3, IniFile.ini, Section, Key3, % A_Space
return
Key1:
Loop 1
{
if not GetKeyState("Key1")
Send {m}
Sleep 100 ;
Send {Down}{Down}{Down}{Down}{Down}{Down}{Enter}{Enter}
Return
}
return
Key2:
Loop 1
{
if not GetKeyState("Key2")
Send {5}{4}
Return
}
return
Key3:
Loop 1
{
if not GetKeyState("Key3")
Send {m}
Sleep 100 ;
Send {Down}{Down}{Down}{Enter}{Down}{Down}{Down}{Down}{Down}{Enter}{Left}{Down}{Right}{Down}{Down}{Enter}{Up}{Up}{Right}{Right}{Down}{Down}{Enter}{m}
Return
}
return
GuiClose:
ExitApp
Последнее редактирование: