Code: Select all
#SingleInstance Force
Start_Hotkey:="numpad1"
Hotkey, %Start_Hotkey% , Start
Gui, 1:+AlwaysOnTop
Gui, 1:Color, Black
Gui, 1:Font, cBlack s12
Gui, 1:Add, Hotkey, x10 y10 vStart_Hotkey, %Start_Hotkey%
Gui, 1:Add, Button, gUpdate_StartKey, Update
Gui, 1:Add, Button, gStart, Start
Gui, 1:Show, w500 h200
return
GuiClose:
Escape::ExitApp
Update_StartKey:
GuiControlGet,New_Key,1:,Start_Hotkey
if(New_Key!=Start_Hotkey)
{
Hotkey, %Start_Hotkey% , Start,off
Start_Hotkey:=New_Key
Hotkey, %Start_Hotkey% , Start,on
}
return
Start:
2::
loop, 2
{
Send {Space down}
Sleep 50
Send {Space up}
Sleep 10
}
return