Page 1 of 1

Need help with sequence =)

Posted: 25 Sep 2018, 13:26
by affebroman
Hi guys,
Im new to autohotkey and can't find out how I should do this specific sequence.

I would like this to happen:

Holding DOWN [Space], will klick [X] followed by holding DOWN [MOUSE1].
RELEASE [Space], will RELEASE [MOUSE1] followed by klicking [X].

I want the the "klick" to be fast and the upfollowing key to be held or released instantly. =)

Re: Need help with sequence =)

Posted: 25 Sep 2018, 13:48
by MannyKSoSo
You mean something like this

Code: Select all

Space Down::
While GetKeyState("Space", "P") {  ;P stands for being held down
  Send, x
  Send, [Click Down]
}
Send, x
Send, [Click Up]
return

Re: Need help with sequence =)

Posted: 25 Sep 2018, 13:55
by emmanuel d
affebroman wrote:klick [X]
Do you want to close a window ore something?? :clap:
affebroman wrote:[MOUSE1]
Never seen Mouse1 before :geek:

Something like:

Code: Select all

Space Down::
	Send X
	Send {LButton down}
	Return
Space Up::
	Send {LButton up}
	Send X
	Return

Re: Need help with sequence =)

Posted: 26 Sep 2018, 01:00
by affebroman
MannyKSoSo wrote:You mean something like this

Code: Select all

Space Down::
While GetKeyState("Space", "P") {  ;P stands for being held down
  Send, x
  Send, [Click Down]
}
Send, x
Send, [Click Up]
return
Hi,

"Space down::" is unavailable.

Is there another way to send this?

Re: Need help with sequence =)

Posted: 26 Sep 2018, 07:40
by MannyKSoSo
You can remove the Down part of "Space Down::" and it should work, however it might trigger the while statement multiple times, which means you would need to add a sleep statement inside the while statement.

Re: Need help with sequence =)

Posted: 26 Sep 2018, 09:50
by affebroman
MannyKSoSo wrote:You can remove the Down part of "Space Down::" and it should work, however it might trigger the while statement multiple times, which means you would need to add a sleep statement inside the while statement.
Can you give me an example because I don't get that to work either.
So basicly I would like holding down space to fast klick X once, followed by holding down LMOUSE untill I release Space. When I release space I want LMOUSE to release and THEN click X again.

Re: Need help with sequence =)

Posted: 26 Sep 2018, 09:57
by affebroman
emmanuel d wrote:
affebroman wrote:klick [X]
Do you want to close a window ore something?? :clap:
Nope I want a fast editing macro for Fortnite editing!
Basiclly you need to press EDIT[X] once, then press and hold [LMOUSE] to draw the pattern you like to edit. Then press EDIT[X] again to proceede the acctual edit.
affebroman wrote:[MOUSE1]
Never seen Mouse1 before :geek:
lol have that on my logitech software sorry..
Something like:

Code: Select all

Space Down::
	Send X
	Send {LButton down}
	Return
Space Up::
	Send {LButton up}
	Send X
	Return