Page 1 of 1

: Fix script to pause macro when mouse bottom is pressed

Posted: 14 Jul 2018, 08:16
by jamarchesan
: Hi,
I need help to fix a macro.
I’m playing a game that I need to cast a skill in bottom “W” (some times) before fight. So, I created a macro that cast/ press W – infinitely.
But, I need to add a command that if I press any mouse bottom, this macro will pause automatically and back to work if any mouse bottom are not pressed.
Original macro:
o:: Loop,
{
Send W
Sleep 400
}
Loop
{
p::exitapp

Re: : Fix script to pause macro when mouse bottom is pressed

Posted: 14 Jul 2018, 08:35
by jamarchesan
jamarchesan wrote:: Hi,
I need help to fix a macro.
I’m playing a game that I need to cast a skill in bottom “W” (some times) before fight. So, I created a macro that cast/ press W – infinitely.
But, I need to add a command that if I press any mouse bottom, this macro will pause automatically and back to work if any mouse bottom are not pressed.
Original macro:
o:: Loop,
{
Send W
Sleep 400
}
Loop
{
p::exitapp
Because I do it several time per minute - I don't wanna need press other bottom to pause it. The pause in mouse bottom is the best

Re: : Fix script to pause macro when mouse bottom is pressed

Posted: 14 Jul 2018, 11:49
by Qysh

Code: Select all

o:: 
Loop
{ 
	if(GetKeyState("LButton", "p") or GetKeyState("MButton", "p") or GetKeyState("RButton", "p"))
	{
		Sleep, 50
		continue
	}
	Send W 
	Sleep 400 
} 

p::exitapp

Re: : Fix script to pause macro when mouse bottom is pressed

Posted: 14 Jul 2018, 12:09
by jamarchesan
its work now !! tranks