sequential gearbox emulation Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
buder28

sequential gearbox emulation

29 May 2017, 17:01

i want to use a sequantial shifter that output 1.2.3.4.5.6 but require the clutch key to be pressed + the shift key +/- those would be on the numpad 7/Clutsch, 8/Gup, 9/Gdown, + an extra key togo to reverse gear (*)

if we were in garrymod i wouln'd need to ask for help :S but we are not on garrymod

i found a similar code for something else but i cant make the gear key to stay on
im not great with autohotkey as i don'T understand most thing :S i need lot of small example for that + some big 1 i can only learn by taking apart part of code and merging them together on most case :crazy:


Example code Found didn't make
;;;;;;;;;;;;;;;;;;;;;;Chain (cast a cycle of differnt abilities)
rbutton & lbutton::
keywait lbutton
{key++
if key = 1
Sendinput {altdown}{y}{altUP}
else if key = 2
Sendinput {altdown}{u}{altUP}
else if key = 3
Sendinput {altdown}{i}{altUP}
else if key = 4
Sendinput {altdown}{o}{altUP}
else if key = 5
{
Sendinput {altdown}{p}{altUP}
key=0 ;reset key here
}
}
return
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: sequential gearbox emulation

30 May 2017, 02:13

Code: Select all

;~ ---------------------------------------------------------
;~ https://autohotkey.com/boards/viewtopic.php?f=5&t=32442
;~ sequential gearbox emulation
;~ ---------------------------------------------------------

$Numpad8::                   ; Up
$Numpad9::                   ; Down
$NumpadMult::seqGearBox()    ; Reverse


seqGearBox()
{
    static gear := 0
	if ((dir := SubStr(A_ThisHotkey,2)) = "NumpadMult")
	{   ; Reverse:
		Sendinput, {Numpad7 down}%dir%{Numpad7 UP}
	    gear := 0
	}
	else if (dir = "Numpad8")
	{   ; Up:
		if (gear < 6)
		{
	        Sendinput, {Numpad7 down}%dir%{Numpad7 UP}
			gear++
		}
	}
	else    
	{   ; Down:
		if (gear > 1)
		{
	        Sendinput, {Numpad7 down}%dir%{Numpad7 UP}
			gear--
	    }
	}
}
HTH
buder28

Re: sequential gearbox emulation  Topic is solved

30 May 2017, 10:48

but it dosent output numpad key 1-6 for the gear it need to hold the gear key gear 1 would be reverse :think:

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ArkuS, Google [Bot], mikeyww and 319 guests