I have 2 problems with this:
1. As you can see it is a simple box where I put a key like hotkey (example "E") in the AHK variable of the hotkey, and any letters in Key1 and Key2, and when pressing the Save button it saves it.
Then when pressing "E" for example in notepad, Exit key1, wait 1 second and Key2, which we put.
I tried to put% ahk%, but I get an error.
2. Is it possible that when I put the Hotkeys and put save, the program remembers the Hotkeys that I put?
So once I close the program and reopen it, can I remember the HotKeys that I set earlier?
Thanks!!!
Code: Select all
#SingleInstance, force
Gui, Add, Text,y10,AHK
Gui, Add, Text,,KEY1
Gui, Add, Text,,KEY2
Gui, Add, Hotkey, ym vahk ,
Gui, Add, Hotkey,vKey1,
Gui, Add, Hotkey,vKey2,
Gui, Add, Button,ym,Save
Gui, Add, Button,x+5,Close
Gui, show,,Hi!
return
ButtonSave:
Gui, Submit, NoHide
return
%ahk%:: ;HELP ME HERE!!!
SendInput, %Key1%
Sleep, 1000
SendInput, %Key2%
return
ButtonClose:
ExitApp
return