Autohotkey: assign buttons twice
12 Nov 2014, 09:09 AM
#1
4
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
4
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
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
17
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 (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
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
4
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
4
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
34 | |||||
28 | |||||
9 | |||||
155 | |||||
20 | |||||
4 | |||||
3 | |||||
2 | |||||
2 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.34957.860+14
- 3.589215.733+4
- 4.1101614.642+2
- 5.305114.728+1
- 6.916405.693-2
- 7.271108.715+22
- 8.721440.621+3
- 9.1041674.607-2
- 10.17146.788+1
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
9
Download
1231
Board Info
852 users are online:
852 guests
1 post in the last 24h
8 posts in the last week
38 posts in the last month
8 posts in the last week
38 posts in the last month
Registered members: 49082
Welcome our newest member, 23winlocker
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, 23winlocker
Most online: 2043 users on 29 Oct 2023, 01:04 AM