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

Ask gaming related questions
Kaetor
Posts: 2
Joined: 06 Jan 2016, 14:09

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

06 Jan 2016, 14:14

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
HotKeyIt
Posts: 2144
Joined: 29 Sep 2013, 18:35
Contact:

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

06 Jan 2016, 19:02

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
User avatar
PipeDreams
Posts: 149
Joined: 19 Dec 2015, 00:20

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

19 Jan 2016, 18:54

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

Return to “Gaming”

Who is online

Users browsing this forum: Google [Bot], Xtra and 11 guests