How to reload the script if paused

Get help with using AutoHotkey and its commands and hotkeys
kkkaioekn
Posts: 11
Joined: 11 Jun 2018, 22:41
Location: ahk beginner

How to reload the script if paused

14 Jun 2018, 10:49

Hello to everyone,

Here is a part of my script


Code: Select all

rand(x,y) 
{
Random, value, %x%, %y% 

Return value 
}

$~LButton::
$*LButton::
	Send {é}
	MouseClick ,Left,X,Y,3,0
	Send {"}
	sleep, % rand(725,727)
	MouseClick ,Left,X,Y,3,0
	Send {é}
return


i use many keys to pause/suspend the script. But when i use my hotkeys to unpause, the script continue from where i stoped him.
but i'm looking to reload the script from the begin if the script is paused/suspended

how to do?

thanks :3
Rohwedder
Posts: 1361
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: How to reload the script if paused

14 Jun 2018, 11:39

Hallo,
try:

Code: Select all

*Pause:: ;Key Pause toggles script Pause/Reload
	Suspend ;Suspend Hotkeys
	Pause,,1 ;Pause Script
	If !(Reload := !Reload)
		Reload ;Reload Script
Return
kkkaioekn
Posts: 11
Joined: 11 Jun 2018, 22:41
Location: ahk beginner

Re: How to reload the script if paused

14 Jun 2018, 12:03

thanks, it work well!!! <3 <3 love love

Return to “Ask For Help”

Who is online

Users browsing this forum: colt, Google [Bot], Noo0B, swagfag, TheDewd, tm6464 and 73 guests