-
Notifications
You must be signed in to change notification settings - Fork 6
/
hat test.ahk
62 lines (48 loc) · 1.03 KB
/
hat test.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
; Operate the 4 hats of a continuous POV vjoy stick
; Minimal error checking (Just check if DLL loaded), just the bare essentials code-wise.
#SingleInstance, force
#include <CvJoyInterface>
; Create an object from vJoy Interface Class.
vJoyInterface := new CvJoyInterface()
; Was vJoy installed and the DLL Loaded?
if (!vJoyInterface.vJoyEnabled()){
; Show log of what happened
Msgbox % vJoyInterface.LoadLibraryLog
ExitApp
}
myStick := vJoyInterface.Devices[1]
; End Startup Sequence
Return
; Hotkeys
F9::
; On press, move hat up
myStick.SetContPov(0, 1)
Return
F9 up::
; On release, center hat
myStick.SetContPov(-1, 1)
Return
F10::
; On press, move hat up
myStick.SetContPov(0, 2)
Return
F10 up::
; On release, center hat
myStick.SetContPov(-1, 2)
Return
F11::
; On press, move hat up
myStick.SetContPov(0, 3)
Return
F11 up::
; On release, center hat
myStick.SetContPov(-1, 3)
Return
F12::
; On press, move hat up
myStick.SetContPov(0, 4)
Return
F12 up::
; On release, center hat
myStick.SetContPov(-1, 4)
Return