Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This script is for Elite Dangerous. It makes your energy distribution clicks click four times instead of one.
- ; You need:
- ; - a joystick with a POV hat that you use for power distribution clicking
- ; - to be annoyed at how many clicks it takes to max shields or engines etc.
- ; - to make sure the arrow keys on the keyboard are the secondary bindings for energy distribution (Up key for engines etc.)
- #Persistent ; Keep this script running until the user explicitly exits it.
- SetTimer, WatchPOV, 50
- return
- WatchPOV:
- GetKeyState, POV, JoyPOV ; Get position of the POV control.
- SetKeyDelay, 10 ; give elite 10ms to recognize key presses
- ; Some joysticks might have a smooth/continous POV rather than one in fixed increments.
- ; To support them all, use a range:
- ; Note that the arc for each direction overlaps with the two adjacent ones.
- if POV >= 28250 ; 282.5 to 360 degrees: Up
- Send, {Up 4}
- if POV between 0 and 6750 ; 0 to 67.5 degrees: Up
- Send, {Up 4}
- if POV between 2250 and 15750 ; 22.5 to 157.5 degrees: Right
- Send, {Right 4}
- if POV between 10250 and 24750 ; 102.5 to 247.5 degrees: Down
- Send, {Down 4}
- if POV between 20250 and 33750 ; 202.5 to 337.5 degrees: Left
- Send, {Left 4}
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement