Page 1 of 1

I made a continuous macro, how do I add a modifier?

Posted: 06 Jan 2016, 14:14
by Kaetor
Hi all,

I made this macro to play an MMO. Currently it does what I want (spams 1). However if I press shift+1 it continues to spam 1. Is there any way to edit this macro so it will continue to spam 1, but also spam shift+1 when I press shift+1 together.

Ins::Suspend
SendMode Input
~$*1::
Loop
{
Send {1}
sleep 0 ;
Send {1 down}
sleep 0 ;
If (GetKeyState("1","P")=0)
Break
}
Return


Thanks

Re: I made a continuous macro, how do I add a modifier?

Posted: 06 Jan 2016, 19:02
by HotKeyIt
Try:

Code: Select all

SendMode Input
Ins::Suspend
~$*1:: 
	If GetKeyState("Shift","P")
		Shift:="+"
	else 
		Shift:=""
	While !GetKeyState("1","P") { 
		Send %Shift%{1}
		sleep 0 ;
		Send %Shift%{1 down}
		sleep 0
	}
Return

Re: I made a continuous macro, how do I add a modifier?

Posted: 19 Jan 2016, 18:54
by PipeDreams
Something like this perhaps?

Code: Select all

Ins::Suspend, Toggle ;Toggle Suspend On/Off
~$*!::
While (GetKeyState("!", "P"))
{ 
	SendInput, {! DownTemp}
	Sleep, 10
	SendInput, {1 DownTemp}
	Sleep, 100
	SendInput, {! Up}
	Sleep, 10
	SendInput, {1 Up}
}
Return