Now my second version won't work. I'm completely lost.
Any advice and help would be greatly appreciated!
First version that works:
Code: Select all
Gui, +AlwaysOnTop
Gui, Add, Edit, vLine1
Gui, Add, Edit, vLine2
Gui, Add, Edit, vLine3
Gui, Add, Edit, vTime1 ym
Gui, Add, Edit, vTime2
Gui, Add, Edit, vTime3
Gui, Add, Button, default, OK
Gui, Show,, autosend
return
GuiClose:
ButtonOK:
Gui, Submit
MsgBox, 4,, are you sure you want to run autosend? (Esc will Exit / F7 will Pause)
IfMsgBox Yes
Loop
{
Send, %Line1%{ENTER}
Sleep, %Time1%000
Send, %Line2%{ENTER}
Sleep, %Time2%000
Send, %Line3%{ENTER}
Sleep, %Time3%000
}
else
ExitApp
return
F7::PAUSE
return
Esc::
ExitApp
return
Code: Select all
Gui, +AlwaysOnTop
Gui, color, 000000
Gui, Font, cWhite
Gui, color,, 000000
Gui, Add, Text, x12 y9 w100 h20 , Message
Gui, Add, Text, x142 y9 w100 h20 , Seconds
Gui, Add, Edit, x12 y29 w100 h30 vLine1, 1
Gui, Add, Edit, x12 y69 w100 h30 vLine2, 2
Gui, Add, Edit, x12 y109 w100 h30 vLine3, 3
Gui, Add, Edit, x12 y149 w100 h30 vLine4, 4
Gui, Add, Edit, x12 y189 w100 h30 vLine5, 5
Gui, Add, Edit, x142 y29 w100 h30 vTime1, 6
Gui, Add, Edit, x142 y69 w100 h30 vTime2, 7
Gui, Add, Edit, x142 y149 w100 h30 vTime3, 8
Gui, Add, Edit, x142 y109 w100 h30 vTime4, 9
Gui, Add, Edit, x142 y189 w100 h30 vTime5, 10
Gui, Add, Button, x12 y229 w100 h30 , OK
Gui, Add, Button, x142 y229 w100 h30 , Stop
Gui, Add, Button, x12 y269 w100 h30 , Pause
Gui, Add, Button, x142 y269 w100 h30 , Help
Gui, Show, x500 y100 h353 w258, AutoSend
ButtonOK:
Sleep, 3000
Send, %Line1%{ENTER}
Sleep, %Time1%000
Send, %Line2%{ENTER}
Sleep, %Time2%000
Send, %Line3%{ENTER}
Sleep, %Time3%000
Send, %Line4%{ENTER}
Sleep, %Time4%000
Send, %Line5%{ENTER}
Sleep, %Time5%000
return
ButtonStop:
ExitApp
return
ButtonPause:
Pause, Toggle
return
ButtonHelp:
Gui +OwnDialogs
OnMessage(0x44, "OnMsgBox")
MsgBox 0x40000, Help, help message will go here
OnMessage(0x44, "")
OnMsgBox() {
DetectHiddenWindows, On
Process, Exist
If (WinExist("ahk_class #32770 ahk_pid " . ErrorLevel)) {
ControlSetText Button1, Close
WinMove 900, 175
}
}
return
Esc::Exitapp
return
F7::
Pause, Toggle
return
GuiClose:
exitapp
return