In game hotkey not working?

Ask gaming related questions (AHK v1.1 and older)
Projctmayhem13
Posts: 3
Joined: 18 Apr 2021, 16:38

In game hotkey not working?

Post by Projctmayhem13 » 18 Apr 2021, 16:47

Hopefully someone can help me, I'm absolutely new to scripting, and hardly any experience in coding.
Just hoping someone can point me in the right direction.
I am trying to make a script to press a button after i press my right mouse click.
This is what i have so far

Code: Select all

#IfWinActive Path of Exile
#SingleInstance force
#NoEnv  
#Warn  
#Persistent

Rbutton::
Send, 8
Random, BBsleep, 200, 325 
sleep, BBsleep
Send, 9
return
[Mod edit: [code][/code] tags added.]

So this works great, i press right mouse button and then it presses 8, then 9.
My problem is i just want it to press 9 after i press right mouse button.
When i take away
Send, 8
and replace it with
Send, Rbutton
it just presses another button in game?

And when i remove the
Send, 8
it just presses 9.

Do i need to put in key states? then ask it to press each button?

The right button is supposed to be a skill, then a delay , then a follow up skill after.
Again if i change my skill keybinds to 8 and 9 it works great. But im afraid the game is seeing right click doing nothing then 2 buttons next.

If anyone can just suggest what method i need to use to make this script work that would be great thanks.

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

Re: In game hotkey not working?

Post by mikeyww » 18 Apr 2021, 17:25

If you want it to press 9, then what is the problem with removing Send 8?
i just want it to press 9 after i press right mouse button. When i remove the Send, 8, it just presses 9.
:?:

Projctmayhem13
Posts: 3
Joined: 18 Apr 2021, 16:38

Re: In game hotkey not working?

Post by Projctmayhem13 » 18 Apr 2021, 17:42

Because it doesn't press right mouse button , just 9. I wanted it to see the right mouse button then 9 , because the skill is bound to right mouse . So I had to change it to skill bind num 8 and 9 for it to work , instead of it seeing right mouse then doing 9 . Sorry if that explaination is not very good

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

Re: In game hotkey not working?

Post by mikeyww » 18 Apr 2021, 17:48

Code: Select all

~RButton::Send 9
Explained: Hotkey modifier symbols

Projctmayhem13
Posts: 3
Joined: 18 Apr 2021, 16:38

Re: In game hotkey not working?

Post by Projctmayhem13 » 18 Apr 2021, 17:53

Thanks alot

Post Reply

Return to “Gaming Help (v1)”