Need help with having parts of my script happen "simultaneously"

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JRPGod
Posts: 4
Joined: 06 Dec 2017, 02:58

Need help with having parts of my script happen "simultaneously"

06 Dec 2017, 11:48

Thanks to the people who tried. I was unable to do it personally.
Last edited by JRPGod on 07 Dec 2017, 09:41, edited 1 time in total.
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Need help with having parts of my script happen "simultaneously"

06 Dec 2017, 13:33

Try:

Code: Select all

RButton & XButton1::Send, {w down}{a}{w up}
RButton::Send, {RButton}
See the Hotkey section of the help file for explanation or to tweak it.
JRPGod
Posts: 4
Joined: 06 Dec 2017, 02:58

Re: Need help with having parts of my script happen "simultaneously"

06 Dec 2017, 13:55

I'm sorry Osprey, I don't understand. How would I try that with what I currently have?
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Need help with having parts of my script happen "simultaneously"

06 Dec 2017, 14:23

Remove or comment out your current RButton and XButton hotkeys and see if that works better.
JRPGod
Posts: 4
Joined: 06 Dec 2017, 02:58

Re: Need help with having parts of my script happen "simultaneously"

07 Dec 2017, 00:13

But, I mean, I tried it every single which way I could. That might be a great general answer to the question "How do I have RButton and XButton1 press A and W together", but I found that countless times myself in the wiki, if it's what I "need" to solve my issue it's not the line of code I struggle with, it's how to implement it with what I currently have and need to do. With all due respect - and please know that I appreciate you taking your time out to help me more than you understand - But did you even read my current situation and problem? I "need" the 0.2 Delays. I didn't go this very long way of writing this script this way just to try and be difficult.
phaleth
Posts: 38
Joined: 13 Apr 2015, 03:49

Re: Need help with having parts of my script happen "simultaneously"

07 Dec 2017, 09:26

Try running this code standalone

Code: Select all

#NoEnv
SetKeyDelay, -1, 110

$XButton1::
KeyWait, XButton1, T0.20
If ErrorLevel = 0
{
	Click X1
	Sleep 100
}
Else
{
	While GetKeyState("XButton1","P")
	{
		Send a
		If GetKeyState("XButton2","P")
		{
      			Send d
		}
	}
}
Return
JRPGod
Posts: 4
Joined: 06 Dec 2017, 02:58

Re: Need help with having parts of my script happen "simultaneously"

07 Dec 2017, 09:39

Thanks for the help I guess phaleth, but I've deleted my help topics on reddit and am just about to here. I've given up on this "project". It's like you said, all I do is "write wall of texts" and not try to learn any code whatsoever I guess.

All I'll say is this dude, you might want to reconsider whether or not you should really be the first person people get "greeted" by when they join the AHK IRC designed to help, and supposedly welcome newcomers to AHK.
phaleth
Posts: 38
Joined: 13 Apr 2015, 03:49

Re: Need help with having parts of my script happen "simultaneously"

07 Dec 2017, 11:11

I'm sorry. Should just tell me to read the forum post as that was what you pasted into IRC.

Don't let that throw you off.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Marium0505 and 351 guests