Jump to content

Tag Keyboard Macro Using Autohotkey


No replies to this topic

#1 p456

    Rookie

  • 1 posts

Posted 26 January 2013 - 03:37 PM

Hello fellow players-
I was looking around trying to find some way to get TAG to be constantly on and went through various online searches trying to find something that worked. Well, I wanted to share my solution to this with others who might be in the same boat.

First, download the AutoHotKey program from this website: (its freeware)

http://www.autohotkey.com/

The download link is in the upper right hand side.

After you go through the install and have it create a simple starter file for you to start making macros with, open that file (should be named AutoHotKey.ahk by default) and place the following inside it:

#InstallKeybdHook

#IfWinActive MechWarrior Online

SetKeyDelay 5, 5

u::
Loop
{
SetKeyDelay 0, 100
Send {4}
GetKeyState, state, o
if state = D
break
}
return

So, now when you press the u key, this will hold down the 4 key (I mapped tag to weapons group 4) and you can keep TAG activated without you needing to hold the key down. If you want to stop holding the 4 key down, press the o key. It should be noted that with this macro, if you want to chat you will want to first press the o key to stop pressing down 4 otherwise you will seeing a bunch of 4's filling up your text box.

If you want to edit it for you own purposes, the following lines are important:

u:: <-- This sets the u key as the start of the loop. Define whatever key you want
Send{4} <-- This is the line that sets the 4 key to be held down. Customize as you like.
GetKeyState, state, o <-- This sets the o key to be the key that exits the loop.

It should be known that this is currently working on a Windows 7 64-bit machine and I run AutoHotKey as administrator.

Happy Gaming!

p456
Intel Ivy Bridge Core i5 3570K
8GB RAM
GTX 460





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users