If I set a hotkey and press setting, it can work (when I press 2 , it shows 12)
and then I let hotkey and used-key be null and press setting. (I want to reset the hotkey)
But the button 2 could not be used, (when I press 2 ,there is nothing) ← Problem1
and then I set the other hotkey as follow
I press 1 on the WordPad , it shows 13 ( it is correct),but press 2 it also shows 13 ← Problem2
I don't know how to solve these two problems,do you have any idea?
Code: Select all
#SingleInstance force
#NoEnv
Gui, Add, Text, x12 y30 w40 h20 , Hotkey1
Gui, Add, Hotkey, x52 y28 w40 h20 vUserInput1,
Gui, Add, Text, x95 y30 w40 h20,UseKey
Gui, Add, Hotkey, x140 y28 w40 h20 vUserInput2,
Gui, Add, Hotkey, x180 y28 w40 h20 vUserInput3,
Gui, Add, Hotkey, x220 y28 w40 h20 vUserInput4,
Gui, Add, Hotkey, x260 y28 w40 h20 vUserInput5,
Gui, Add, Hotkey, x300 y28 w40 h20 vUserInput6,
Gui,font,s15
Gui, Add, Button, x12 y60 w120 h30 gSetting, Setting
Gui,Show
Setting:
{
GuiControlGet, UserInput1
GuiControlGet, UserInput2
GuiControlGet, UserInput3
GuiControlGet, UserInput4
GuiControlGet, UserInput5
GuiControlGet, UserInput6
Gui,submit,Nohide
}
if %UserInput1%
Hotkey,$%UserInput1%,SendMe
SendMe:
SendInput,%UserInput2%
sleep 30
SendInput,%UserInput3%
sleep 30
SendInput,%UserInput4%
sleep 30
SendInput,%UserInput5%
sleep 30
SendInput,%UserInput6%
return
GuiClose:
ExitApp