End Script
Posted: 16 May 2022, 10:58
I have a script that I am trying to stop, but ExitApp and Return aren't working for me. It still keeps running in the background, doing nothing. Can anyone help me with this?
Thanks!
Thanks!
Let's help each other out
https://www.autohotkey.com/boards/
https://www.autohotkey.com/boards/viewtopic.php?f=76&t=104138
Code: Select all
#SingleInstance Force
Code: Select all
#SingleInstance Force
MsgBox, Welcome to SimpleCalc!
InputBox, Firstnum, SimpleCalc, Enter first number.
InputBox, Secnum, SimpleCalc, Enter second number.
;Operator buttons below
Gui, -Caption +LastFound -SysMenu +ToolWindow -DPIScale
Gui, Font, s15
Gui, Add, Text,, Please enter operator:
Loop, Parse,% "+,-,*,/,^", CSV
Gui, Add, Button, x+ y20 gOperator,% A_LoopField
Gui, Show
Return
Operator:
Operator := StrReplace(A_GuiControl, "&&", "&")
Gui, Destroy
Switch, Operator
{
Case "+":Result := Firstnum + Secnum
; ...
Case "*":Result := Firstnum * Secnum
; ...
Case "-":Result := Firstnum - Secnum
; ...
Case "/":Result := Firstnum / Secnum
; ...
Case "^":Result := Firstnum ** Secnum
}
MsgBox,% "The answer is: " Result
MsgBox, 4,, Would you like to start another session?
IfMsgBox Yes
Run, SimpleCalc.exe
else
Sleep, 10000
return
return
return
ExitApp [, ExitCode]