problems with e not getting registered

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
diozz
Posts: 19
Joined: 11 Mar 2021, 09:50

problems with e not getting registered

Post by diozz » 14 Apr 2021, 07:35

this is the code:

Code: Select all

SetBatchLines -1


*~$e::
{
click right up
sleep 1000
}
return


*~$Rbutton::
{		
while getkeystate("rbutton","p")	
	{
	click right
	sleep  60
	}
}
click right up
return
[Mod edit: [code][/code] tags added.]


i'm keeping e pressed and then pressing rbutton and keep it pressed..with rbutton still pressed u release e, the script wont register anymore the e key if u press it until u let go rbutton again..dont understand why..can any help?

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: problems with e not getting registered

Post by mikeyww » 14 Apr 2021, 07:49

It seems like you are trying to issue conflicting actions at the same time. What are you hoping to achieve with the script?

diozz
Posts: 19
Joined: 11 Mar 2021, 09:50

Re: problems with e not getting registered

Post by diozz » 14 Apr 2021, 11:22

mikeyww wrote:
14 Apr 2021, 07:49
It seems like you are trying to issue conflicting actions at the same time. What are you hoping to achieve with the script?
Im trying to have the rbutton spammed whenever i keep it pressed. When i tap e i'd like the rbutton to stop spamming for a bit..then when e is done with its sleeping time, (im assuming i dont have e down anymore)It should go back spamming rbutton if i have It still down..what i have there does this, but if i press e then rbutton (which Will happen for what i have to do) and then without releasin rbutton i go back to press e, It Just doesnt get the e at all..i Need It to understand i'm pressing e again WOTHOUT having to release rbutton at all to fix the problem...cause right now thats fixing It..

User avatar
mikeyww
Posts: 26601
Joined: 09 Sep 2014, 18:38

Re: problems with e not getting registered

Post by mikeyww » 14 Apr 2021, 12:33

Code: Select all

RButton::
SoundBeep, 1500
on := True
While GetKeyState("RButton", "P") {
 If !GetKeyState("e", "P")
  Click, Right
 Sleep, 25
}
on := False
SoundBeep, 1000
Return
#If on
e::Return
#If

diozz
Posts: 19
Joined: 11 Mar 2021, 09:50

Re: problems with e not getting registered

Post by diozz » 15 Apr 2021, 01:46

i'd like e to have the sleeping time i put originally though when i press it.. i dont want it to stop the rbutton just for the time its pressed. i'd like to tap it and then release it knowing there's going to be that sleeping time originally posted before my rbutton will start spamming again (while all of this i'll be holding down rbutton constantly)

diozz
Posts: 19
Joined: 11 Mar 2021, 09:50

Re: problems with e not getting registered

Post by diozz » 15 Apr 2021, 01:52

btw its behaving weardly. if u keep rbutton pressed then press e repeatedly sometimes it stops reading the rbutton altogether, scripts stops..

Post Reply

Return to “Ask for Help (v1)”