AHK Scripting in War of the Roses (The F Keys)

Ask gaming related questions (AHK v1.1 and older)
Foxx
Posts: 2
Joined: 20 Apr 2014, 07:41

AHK Scripting in War of the Roses (The F Keys)

Post by Foxx » 20 Apr 2014, 08:09

I currently use the Alt&Numpad keys to present an in-game RCon command. For example if I wish to kick a player, the script is:

;Alt2 will type out the kick command - add the end of the player ID

!Numpad2::
Send, y{Backspace 5}
SendRaw,/rcon password /kick_player 11000010
return

I wanted to know if it was possible to use the "F Keys" in the same way for example:

;F2 will type out the kick command - add the end of the player ID

!F2::
Send, y{Backspace 5}
SendRaw,/rcon password /kick_player 11000010
return

Would this work or does it require more code for the F key to have the same functionality or would it not work at all.

Regards.

Builder
Posts: 14
Joined: 20 Apr 2014, 11:31

Re: AHK Scripting in War of the Roses (The F Keys)

Post by Builder » 20 Apr 2014, 12:18

As near as I can tell, the F-keys are just another key as far as AHK is concerned.

http://ahkscript.org/docs/commands/Send.htm

Foxx
Posts: 2
Joined: 20 Apr 2014, 07:41

Re: AHK Scripting in War of the Roses (The F Keys)

Post by Foxx » 20 Apr 2014, 13:59

Builder wrote:As near as I can tell, the F-keys are just another key as far as AHK is concerned.

http://ahkscript.org/docs/commands/Send.htm
I would agree with that however, how do I map an F key into my script.

Currently my script says that if I hit the Alt key and a number from the numpad a command will appear in-game for me to action.

Somehow I need to identify the F Key code/action/whatever and type it into my script.

Builder
Posts: 14
Joined: 20 Apr 2014, 11:31

Re: AHK Scripting in War of the Roses (The F Keys)

Post by Builder » 21 Apr 2014, 14:17

The above doc will tell you precisely how to set up a F hotkey... after that, setting up the action is the same as with any other hotkey.

geek
Posts: 1052
Joined: 02 Oct 2013, 22:13
Location: GeekDude
Contact:

Re: AHK Scripting in War of the Roses (The F Keys)

Post by geek » 21 Apr 2014, 14:37

By "F key" do you mean the Fn key?

Girlgamer
Posts: 12
Joined: 03 Jun 2014, 14:52

Re: AHK Scripting in War of the Roses (The F Keys)

Post by Girlgamer » 04 Jun 2014, 03:17

Keep in mind that the f1 through f12 keys often have ingame functions that could be interfered with if you remap it using a hotkey. It's important to check to see which F keys are being used by the game and which are not. You can also use the shift, alt, and control modifiers to the F hotkey as well to help keep the game's built in f keys secure.

User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: AHK Scripting in War of the Roses (The F Keys)

Post by evilC » 09 Jun 2014, 14:39

Foxx wrote: !F2::
Send, y{Backspace 5}
SendRaw,/rcon password /kick_player 11000010
return

Would this work or does it require more code for the F key to have the same functionality or would it not work at all.
Yes, this is the correct syntax for binding something to Alt-F2

Post Reply

Return to “Gaming Help (v1)”