Can someone lend a hand please?
I need the button to toggle between Start/Stop, and at the same time I want the while loop to break when the "Stop" button is pressed.
Code: Select all
#SingleInstance Force
Gui, Add, Button, w90 h30 Default gButton vButton, Start
Gui, Show
return
GuiClose:
ExitApp
Button:
Toggle := !Toggle
While Toggle
{
Sleep 50
GuiControl,, Button1, Stop
Sleep 50
ToolTip Main Loop is Running
}
ToolTip
GuiControl,, Button1, Start
Return