Código: Seleccionar todo
Global $Paused
HotKeySet("{º}", "TogglePause")
HotKeySet("{RIGHT}", "Terminate")
#include <GUIConstantsEx.au3>
GUICreate("Luvinia", 350, 500)
GUISetState(@SW_SHOW)
GUICtrlCreateLabel("primera ", 8, 10)
$key1 = "{f1}"
GUICtrlCreateLabel("Time", 8, 44)
$time1 = GUICtrlCreateInput("", 55, 40, 40)
$startbutton = GUICtrlCreateButton("Inicar", 55, 8, 40)
GUICtrlCreateLabel("segunda", 8, 75)
$key1 = "{f2}"
GUICtrlCreateLabel("Time", 8, 104)
$time2 = GUICtrlCreateInput("", 55, 100, 40)
$startbutton = GUICtrlCreateButton("Inicar", 55, 68, 40)
WinWaitActive("Sin título: Bloc de notas")
While 1
$msg = GUIGetMsg()
Select
Case $msg = $startbutton
$send1 = ("{1}")
$sleep1 = GUICtrlRead($time1)
$send2 = ("{2}")
$sleep2 = GUICtrlRead($time2)
While 1
Send($send1)
Sleep($sleep1*100)
Send($send2)
Sleep($sleep2*100)
WEnd
Case $msg = $GUI_EVENT_CLOSE
GUIDelete()
ExitLoop
EndSelect
WEnd
Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip('Script is "Paused"',0,0)
WEnd
ToolTip("")
EndFunc
Func Terminate()
Exit 0
EndFunc