Autohotkey: assign buttons twice
12 Nov 2014, 09:09 AM
#1


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


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

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
)
;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

12 Nov 2014, 11:16 AM
#4


Posts: 542 | Subs: 1
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)
Could you elaborate which command line does what?
12 Nov 2014, 11:22 AM
#5



Posts: 2838 | Subs: 3
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)
Great tip!

12 Nov 2014, 11:24 AM
#6

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.
All I really know is it works for reversing tanks and reinforcing

12 Nov 2014, 11:29 AM
#7

Posts: 43
Great tip!
Cheers

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


Posts: 542 | Subs: 1
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

Posts: 43
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

23 Feb 2015, 17:02 PM
#10


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.
For Example i want to click numbers 1-9 just once (physically) to select a unit.
PAGES (1)

1 user is browsing this thread:
1 guest
Livestreams
![]() |
![]() |
![]() |
165 | ||
![]() |
![]() |
![]() |
58 | ||
![]() |
![]() |
![]() |
12 | ||
![]() |
![]() |
![]() |
9 | ||
![]() |
![]() |
![]() |
18 | ||
![]() |
![]() |
![]() |
4 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.42463.871+2
- 2.659233.739+2
- 3.300162.649+1
- 4.286110.722-2
- 5.12443.743+2
- 6.310114.731+6
- 7.193100.659+3
- 8.10829.788+9
- 9.370283.567+3
- 10.1171650.643+2
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
13

Download
1317
Board Info
583 users are online:
583 guests
0 post in the last 24h
4 posts in the last week
42 posts in the last month
4 posts in the last week
42 posts in the last month
Registered members: 51781
Welcome our newest member, Horbe22677
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Horbe22677
Most online: 2043 users on 29 Oct 2023, 01:04 AM