i am trying to make my script able to be paused right after running then resume when i unpause it. I tried to use the Pause::Pause to bind the pause key to pause which works but it wont run the rest of my script even if i do not pause it. If i remove that line then the rest of the script runs normally how it is suppose to. I even tried adding a Pause, Off bleow it, then above it and neither work. I double click the taskbar icon to see what was run in the script and it keeps stopping as soon as it hits the Pause::Pause. Any help on fixing this would be greatly appreciated.
Code:
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#InstallKeybdHook ; Install Keyboard Hook
#UseHook ON ; Turn Hook On
#Persistent
#SingleInstance FORCE
Process, Priority,, Realtime ; Set Script priority to Realtime
Pause, Off
Pause::Pause
Sleep, 3000
SendRaw U
Sleep, 100
Loop 5
{
Loop 10
{
SendRaw 1
Sleep, 3000
SendRaw 2
Sleep, 1500
SendRaw 3
Sleep, 1000
}
SendRaw P
Sleep, 100
SendRaw P
Sleep, 100
SendRaw P
Sleep, 10000
SendRaw 3
Sleep, 1000
}