Login

russian armor

Autohotkey: assign buttons twice

12 Nov 2014, 09:09 AM
#1
avatar of Lümmel
Patrion 14

Posts: 542 | Subs: 1

Question is described in title: lets say I want to assign mButton twice. When i select cons I throw a molotov, when I select guards I button vehicles with the mButton (click with the mousewheel). Is this possible somehow?
12 Nov 2014, 10:33 AM
#2
avatar of Fanatic
Patrion 14

Posts: 480 | Subs: 1

Afaik this is not possible with Autohotkey. You can just assign one specific Button to another specific Button. Its a 1:1 relation but not 1:n.
12 Nov 2014, 11:07 AM
#3
avatar of RedDog

Posts: 43

Yes you can, I have assigned 'r' to reverse for tanks. The classic reverse key is 'u', but I still want to use classic key 'r' for reinforce, so I use this:

;SetKeyDelay [, Delay, PressDuration, Play]
SetKeyDelay , 150, 50
r::-Send ru

I'm not sure what the Guards 'Button' hotkey is, lets say it is 'b'. Conscript Molotov is 'v'. You can try this:

;SetKeyDelay [, Delay, PressDuration, Play]
SetKeyDelay , 150, 50
MButton::-Send vb

(remove the - from the above command, if you have : and S together you it shows as :S )

12 Nov 2014, 11:16 AM
#4
avatar of Lümmel
Patrion 14

Posts: 542 | Subs: 1

jump backJump back to quoted post12 Nov 2014, 11:07 AMRedDog
Yes you can, I have assigned 'r' to reverse for tanks. The classic reverse key is 'u', but I still want to use classic key 'r' for reinforce, so I use this:

;SetKeyDelay [, Delay, PressDuration, Play]
SetKeyDelay , 150, 50
r::-Send ru

I'm not sure what the Guards 'Button' hotkey is, lets say it is 'b'. Conscript Molotov is 'v'. You can try this:

;SetKeyDelay [, Delay, PressDuration, Play]
SetKeyDelay , 150, 50
MButton::-Send vb

(remove the - from the above command, if you have : and S together you it shows as :S )



Could you elaborate which command line does what?
12 Nov 2014, 11:22 AM
#5
avatar of computerheat
Honorary Member Badge
Benefactor 117

Posts: 2838 | Subs: 3

jump backJump back to quoted post12 Nov 2014, 11:07 AMRedDog
Yes you can, I have assigned 'r' to reverse for tanks. The classic reverse key is 'u', but I still want to use classic key 'r' for reinforce, so I use this:

;SetKeyDelay [, Delay, PressDuration, Play]
SetKeyDelay , 150, 50
r::-Send ru

I'm not sure what the Guards 'Button' hotkey is, lets say it is 'b'. Conscript Molotov is 'v'. You can try this:

;SetKeyDelay [, Delay, PressDuration, Play]
SetKeyDelay , 150, 50
MButton::-Send vb

(remove the - from the above command, if you have : and S together you it shows as :S )

Great tip! :thumb:
12 Nov 2014, 11:24 AM
#6
avatar of RedDog

Posts: 43

I can't explain it all as I just copied it from someone else's script. The third line sends v and b to middle mouse button. I guess the first two lines set the delay of the key press.

All I really know is it works for reversing tanks and reinforcing :) (I also use it for sprint on sniper,as n is quite far away so e is easier) Give it a go in single player to test it, save the game when you have Guards and Cons on the field.
12 Nov 2014, 11:29 AM
#7
avatar of RedDog

Posts: 43


Great tip! :thumb:


Cheers :D

The only downside of it is that if you want to chat to someone in steam it keeps reassigning the keys so I use this to disable it:


; f11 suspends script
; reenable long beep
; suspend short beep
f11::
Suspend
if ( A_IsSuspended )
{
SoundBeep
}
if ( !A_IsSuspended )
{
SoundBeep, 523,850
}

There might be another way but it's all a bit complicated for me haha.
12 Nov 2014, 11:31 AM
#8
avatar of Lümmel
Patrion 14

Posts: 542 | Subs: 1

jump backJump back to quoted post12 Nov 2014, 11:24 AMRedDog
I can't explain it all as I just copied it from someone else's script. The third line sends v and b to middle mouse button. I guess the first two lines set the delay of the key press.

All I really know is it works for reversing tanks and reinforcing :) (I also use it for sprint on sniper,as n is quite far away so e is easier) Give it a go in single player to test it, save the game when you have Guards and Cons on the field.


I'll try it when i get home, thanks a lot! This will be really useful :)
12 Nov 2014, 11:35 AM
#9
avatar of RedDog

Posts: 43

jump backJump back to quoted post12 Nov 2014, 11:31 AMLümmel


I'll try it when I get home, thanks a lot! This will be really useful :)


No worries, I guess you could assign all grenade keys to middle mouse :p

23 Feb 2015, 17:02 PM
#10
avatar of Lümmel
Patrion 14

Posts: 542 | Subs: 1

Another question: Is it possible to klick a button twice automatically?

For Example i want to click numbers 1-9 just once (physically) to select a unit.
1 user is browsing this thread: 1 guest

Livestreams

Offline

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

505 users are online: 1 member and 504 guests
DonnieChan
4 posts in the last 24h
32 posts in the last week
85 posts in the last month
Registered members: 44630
Welcome our newest member, kajalfw8
Most online: 2043 users on 29 Oct 2023, 01:04 AM