Тема: AHK: Gui, Hotkey, Сохранить HotKey в ini фаил.
Как сделать правильно?
IniRead, Key1, Save.ini, Section, KEY1, % A_Space
IniRead, Key2, Save.ini, Section, KEY2, % A_Space
IniRead, Key3, Save.ini, Section, KEY3, % A_Space
IniRead, Key4, Save.ini, Section, KEY4, % A_Space
Gui, Add, Hotkey, vA1, % KEY1
Gui, Add, Hotkey, vA2, % KEY2
Gui, Add, Hotkey, vA3, % KEY3
Gui, Add, Hotkey, vA4, % KEY4
Gui, Add, Button, gSave1, Save
Gui, Show
Save1:
Loop, 4
{
IniWrite, % Key1 Seve.ini, Section, KEY1
IniWrite, % Key2 Seve.ini, Section, KEY2
IniWrite, % Key3 Seve.ini, Section, KEY3
IniWrite, % Key4 Seve.ini, Section, KEY4
Hotkey, % A%A_Index%, off, UseErrorLevel
GuiControlGet, A%A_Index%
Hotkey, % A%A_Index%, A%A_index%, on, UseErrorLevel
}
return
A1:
{
SendInput, {1}{1}{1}{1}
}
return
A2:
{
SendInput, {2}{2}{2}{2}
}
return
A3:
{
SendInput, {3}{3}{3}{3}
}
return
A4:
{
SendInput, {4}{4}{4}{4}
}
return