Skip to content

Instantly share code, notes, and snippets.

@QZLin
Created January 6, 2022 08:54
Show Gist options
  • Save QZLin/b9f32c18bcd0d33d7f75b89444b9a138 to your computer and use it in GitHub Desktop.
Save QZLin/b9f32c18bcd0d33d7f75b89444b9a138 to your computer and use it in GitHub Desktop.
Stellaris Right Button Drag
#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