a few small critiques
1. a necessary habit is code indentation, whether you follow general rules or keep it cozy
2. use code tags if you can for legibility when posting
Code: Select all
#SingleInstance Force
;IF NOT A_IsAdmin
;{
;Run *RunAs "%A_ScriptFullPath%"
;ExitApp
;}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;THIS NEXT PART IS THE POP-UP WHEN YOU RUN THE SCRIPT
txt11 =
(Ltrim Join`n
Hello and welcome to using the F9LMs made by Ozzy_OD!
Press Ctrl+J to START and Ctrl+K to STOP.
An audible 'boop' noise will be played to signify the START/STOP input.
An audible 'beep-beep' noise will be heard when the script activates "Job-Hopper.exe".
to get familiar with these sounds, Try the following,
Hold 'Ctrl' and on your Numpad press these:
/ will play the "Start" sound of the script
* Will play the "Cash recieved" sound.
- Will play the "Stop" sound of the script.
)
msgbox, 0, F9-Loop Macro script, %txt11%
Return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Sound Effect Testers
^NumpadDiv:: ;;StartSound
{
SoundBeep, 250, 100
SoundBeep, 750, 250
}
return
^NumpadMult:: ;;MoneySound
{
SoundBeep, 1250, 100
SoundBeep, 1250, 10]return[/b]
}
return
^NumpadSub:: ;;StopSound
{
SoundBeep, 750, 100
SoundBeep, 250, 250
}
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;THIS IS WHERE THE MAGIC HAPPENS.
^j::
SoundBeep, 250, 100
SoundBeep, 750, 250
SetTimer, Loop, % (Toggle:=!Toggle) ? 60000: "Off" ;swaps the value of toggle then tests if toggle is true, if true run Loop ever 60sec else turn Loop off
return
^k::
SoundBeep, 750, 100
SoundBeep, 250, 250
MsgBox, 0, F9-Loop Macro script, You have now stopped using the F9-Loop Macro script!
Sleep 200
ExitApp
return
Loop:
Send {F9}
SoundBeep, 1250, 100
SoundBeep, 1250, 100
return
if you use {} braces after a hotkey definition then it will only run what is in the chunk (no return necessary)
however if you have no braces it will treat is like a goto label and run from that point (return necessary)
edit: thanks for the note