Advertisement
Guest User

Untitled

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