Toggle holding down left mouse while spamming the e button

Ask gaming related questions (AHK v1.1 and older)
hishighness
Posts: 25
Joined: 26 Dec 2015, 20:32

Toggle holding down left mouse while spamming the e button

20 May 2017, 08:02

Good day all, I have what I'm sure is a very simple issue. The game I play, Empyrion, has a Tier 1 drill that allows you to extract ore from the ground by digging it up and spitting the ore out whereas the Tier 2 drill just digs it up and puts the ore into your inventory directly. What I'm looking to do is to modify the script I currently have for automining to also spam the e button to pick up the ore I'm drilling while I'm stuck with the tier 1 drill as soon as it appears in front of my drill. So ideally the script would hold down the left mouse key and at the same time spam e. I can make one happen or the other, but not both at the same time.

Here's my current script.

Code: Select all

F9::
	toggle3 := !toggle3
	While toggle3{
	Send e
	sleep 1
}
return

f8::
Toggle2 := !Toggle2
GoSub, SendKey2
return

SendKey2:
If Toggle2 {
	SendInput {LButton Down}
	}
else {
	SendInput {LButton Up}
     }
return

~LButton::
~RButton::
if (toggle2)
{
	Toggle2:=0
	Gosub, SendKey2
}
return
Currently as you can see I have the spam e as F9 and the hold left click down as F8 but Ideally I'd like to have them both work concurrently when I press F8.

Any help would be appreciated and I thank you very kindly for your time. :)
donovv
Posts: 108
Joined: 15 Apr 2017, 21:06

Re: Toggle holding down left mouse while spamming the e button

25 May 2017, 22:09

try this let me know if it works

Code: Select all

#maxthreadsperhotkey 2
$f8::
	toggle := !toggle
		while toggle
			{
				send {Lbutton} {down}
					while toggle
						{
						send e
						sleep 500
						}
				send {lbutton} {up}			
			}
return

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 80 guests