Version 2.28 autoit Code;
NOT AUTOHOTKEY CODE.
; Press Esc to terminate script,
HotKeySet("{ESC}", "Terminate")
Global $LastKnownKey = 10000
#include <Misc.au3> ;Version 2.28 autoit... Contains _IsPressed Logic
Local $hDLL = DllOpen("user32.dll")
AutoItSetOption( "SendAttachMode", 1 )
SendKeepActive("[CLASS:MechWarrior Online]" )
SendKeepActive("[CLASS:CryENGINE]")
While 1
;_IsPressed
;60 Numeric keypad 0 key
;61 Numeric keypad 1 key
;62 Numeric keypad 2 key
;63 Numeric keypad 3 key
;64 Numeric keypad 4 key
;65 Numeric keypad 5 key
;66 Numeric keypad 6 key
;67 Numeric keypad 7 key
;68 Numeric keypad 8 key
;69 Numeric keypad 9 key
;57 W key
;53 S key
;Records your last know Throttle
If _IsPressed("60",$hDLL) Then
$LastKnownKey = 0
ElseIf _IsPressed("61",$hDLL) Then
$LastKnownKey = 1
ElseIf _IsPressed("62",$hDLL) Then
$LastKnownKey = 2
ElseIf _IsPressed("63",$hDLL) Then
$LastKnownKey = 3
ElseIf _IsPressed("64",$hDLL) Then
$LastKnownKey = 4
ElseIf _IsPressed("65",$hDLL) Then
$LastKnownKey = 5
ElseIf _IsPressed("66",$hDLL) Then
$LastKnownKey = 6
ElseIf _IsPressed("67",$hDLL) Then
$LastKnownKey = 7
ElseIf _IsPressed("68",$hDLL) Then
$LastKnownKey = 8
ElseIf _IsPressed("69",$hDLL) Then
$LastKnownKey = 9
EndIf
;Resets your Throttle
If _IsPressed("57",$hDLL) Then
While _IsPressed("57", $hDLL)
Sleep(250)
WEnd
ResetThrottle()
ElseIf _IsPressed("53",$hDLL) Then
While _IsPressed("53", $hDLL)
Sleep(250)
WEnd
ResetThrottle()
EndIf
WEnd
;;;;;;;;
Func ResetThrottle()
If $LastKnownKey = 0 Then
Send ("{NUMPAD0}")
ElseIf $LastKnownKey = 1 Then
Send ("{NUMPAD1}")
ElseIf $LastKnownKey = 2 Then
Send ("{NUMPAD2}")
ElseIf $LastKnownKey = 3 Then
Send ("{NUMPAD3}")
ElseIf $LastKnownKey = 4 Then
Send ("{NUMPAD4}")
ElseIf $LastKnownKey = 5 Then
Send ("{NUMPAD5}")
ElseIf $LastKnownKey = 6 Then
Send ("{NUMPAD6}")
ElseIf $LastKnownKey = 7 Then
Send ("{NUMPAD7}")
ElseIf $LastKnownKey = 8 Then
Send ("{NUMPAD8}")
ElseIf $LastKnownKey = 9 Then
Send ("{NUMPAD9}")
EndIf
EndFunc
Func Terminate()
Exit 0
EndFunc ;==>Terminate
Currently throttle decay sucks because its either hold down w or you go back to zero. Its hardly ever used. But what if it didn't do that? Imagine if you had preset your throttle to 50%, using the numpad, then when you needed a little speed boost you held w to thottle up, and when you let go it decayed back to 50% instead of zero, the number that you had preset before. I think this would improve controls greatly for everyone.
Edited by ManDaisy, 04 December 2013 - 03:06 PM.