Created
January 6, 2022 08:54
-
-
Save QZLin/b9f32c18bcd0d33d7f75b89444b9a138 to your computer and use it in GitHub Desktop.
Stellaris Right Button Drag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires AutoHotkey v2.0-beta.3 | |
#SingleInstance force | |
x:=-1 | |
y:=-1 | |
x1:=-1 | |
x2:=-1 | |
#HotIf WinActive("ahk_exe stellaris.exe") | |
RButton::{ | |
;~ OutputDebug("a`n") | |
Send("{MButton down}") | |
MouseGetPos(&x, &y) | |
Sleep(50) | |
MouseGetPos(&x1, &y1) | |
if(x==x1&&y==y1){ | |
Send("{MButton up}") | |
Send("{RButton}") | |
return | |
} | |
KeyWait("RButton") | |
Send("{MButton up}") | |
} | |
RButton::MButton | |
MButton::RButton |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment