Hello,
I'm in need of a script which does following:
if I press RMouse:
- RMouse Down
- RMouse Up
- RMouse Down
- keep RMouse down until I release RMouse.
So basiclly a double right click, but the RMouse only goes up again when I release it.
I think the code could look something like this: (never coded anything with AHK, so I'm just guessing)
if("RightMouseClick") //I will be holding down RMouse
{
"RightMouseUp";
"RightMouseDown";
} //So now because I was holding down RMouse, it will register RightMouseUp when I release it, right? :^)
To give some context for what I need this script:
In the game Battleground, in order to ADS temporary you need to double click and hold RMouse. Now I'm looking for a way to automaticly do this second click, so that I can just hold RMouse und still go ADS.
I hope I didn't repeat my self too often and did describe my problem understandable.
Greetings
Need help for creating a simple script Topic is solved
-
- Posts: 4
- Joined: 24 Mar 2017, 08:42
-
- Posts: 4
- Joined: 24 Mar 2017, 08:42
Re: Need help for creating a simple script
Can someone pls help me?
I tried following script, but it doesn't seem to work:
if (Click down right)
{
Click up right
Click down right
}
I never used AHK and there is way to much content in the AutoHotkey Help for me to figure out how to do this. :^(
I tried following script, but it doesn't seem to work:
if (Click down right)
{
Click up right
Click down right
}
I never used AHK and there is way to much content in the AutoHotkey Help for me to figure out how to do this. :^(
-
- Posts: 10
- Joined: 21 Mar 2017, 22:56
Re: Need help for creating a simple script Topic is solved
Tell me if this code works for you
Code: Select all
$LButton::
{
Click
Click Down
while getkeystate("LButton","P")
{
}
Click Up
return
}
-
- Posts: 4
- Joined: 24 Mar 2017, 08:42
Re: Need help for creating a simple script
Thank you so much! Works perfectly!
Re: Need help for creating a simple script
For future reference, instead of using a while loop you can simply use KeyWait LButton which is a neater way of waiting for the user to release LButton.CrescentSurfer wrote:Code: Select all
while getkeystate("LButton","P") { }
Who is online
Users browsing this forum: No registered users and 54 guests