Code: Select all
#IfWinActive Euro Truck Simulator 2 ; Replace "Euro Truck Simulator 2" with "American Truck Simulator" if you plan to use it in ATS
SetKeyDelay, 0, 1
firstrun = 1
; Off/Markers/Low beam switch function
2joy5::
Send L ; Markers on
KeyWait 2joy5 ; On release, switch off
Send L
Send L
return
2joy11::
Send L ; Low beam on
KeyWait 2joy11 ; On release, back to markers
Send L
Send L
return
; High beam
2joy4::
Send K
KeyWait 2joy4
Send K
return
; Next & Previous Gear
2joy16:: ; Front fog light
if (firstrun = 1) {
firstrun = 0
KeyWait 2joy12
Send {RShift} ; Right Shift Key
} else {
Send {RCtrl} ; Right Ctrl Key
KeyWait 2joy12
Send {RShift}
}
return
2joy1:: ; Back fog light
Send {RCtrl}
KeyWait 2joy1
Send {RShift}
return
; Left Blinker
2joy6::
Send A
KeyWait 2joy6
Send A
return
; Right Blinker
2joy18::
Send Z
KeyWait 2joy18
Send Z
return
; Horn
2joy2::
Send {H Down}
KeyWait 2joy2
Send {H Up}
return
; Flash
2joy3::
Send {J Down}
KeyWait 2joy3
Send {J Up}
return
; Off/Parking break/Warning switch function
2joy12::
Send w ; Parking break on
KeyWait 2joy12 ; On release, switch off
Send w
return
2joy10::
Send F ; Warning on
KeyWait 2joy10 ; On release, back to Parking break
Send F
return