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
![]() |
![]() |
![]() |
92 | ||
![]() |
![]() |
![]() |
9 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
0 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.59783.878+1
- 2.10134.748+2
- 3.300166.644+1
- 4.14749.750-1
- 5.14939.793+8
- 6.14765.693+15
- 7.18151.780+4
- 8.19081.701+1
- 9.199105.655+2
- 10.1179654.643+2
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger

Einhoven Country

Honor it
14

Download
1385
Board Info
371 users are online:
371 guests
5 posts in the last 24h
10 posts in the last week
35 posts in the last month
10 posts in the last week
35 posts in the last month
Registered members: 54296
Welcome our newest member, 8xbetgifts
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, 8xbetgifts
Most online: 2043 users on 29 Oct 2023, 01:04 AM