Darkwind
Hotkeys via AutoHotKey, How to use AutoHotKey in DW

nbk_redspy


Posted Jun 20, 2009, 8:48 am
http://www.autohotkey.com

Want to have a hot key for hand brake?  How about a key that allows you to select a weapon without clicking on it.

You can do it with AutoHotKey, which is an open source key remapper.

Below is the script that I'm using for DarkWind.  # means windows key, ^ means control and ! means alt key.

Has the basics, windows+b hits the hand brake, windows 1-4 clicks the weapons box Front Left, Front Right, Rear Left, Rear Right.

Note - the click and return is realtive to the screen size so you will probably have to use the window spy (right click the "H" icon in the task bar).

The great thing about AutoHotKey is that you can remap keys for a specific app, so you don't have to worry about it messing up your other apps.


The script I'm using is below the dashes
Just copy the text into a text file and save with an .ahk extension.  Double clicking it will run the script in auto hot key.

---------------------



#IfWinActive Darkwind
    #1::ClickAndReturn(121, 247)
    #2::ClickAndReturn(239, 237)
    #3::ClickAndReturn(121, 684)
    #4::ClickAndReturn(239, 684)
    #b::ClickAndReturn(21,911)
    #d::
        return    ;Disable 'show desktop'
    F11::MouseMove 10,10
    F12::SendInput tTest
    ^t::
        return    ;Disable timeout hot key   
    #r::ClickAndReturn(34, 750)    ;Not ready
    MButton::m
    !a::,
    !d::.
#IfWinActive


;----Clicks a point and returns to the previous location
ClickAndReturn(x, y)
{
    CoordMode Mouse, Screen
    MouseGetPos oldMouseX, oldMouseY
    CoordMode Mouse, Relative
    MouseClick Left, %x%, %y%, 1 , 0
    ;Click %x%, %y%
    CoordMode Mouse, Screen
    MouseMove %oldMouseX%, %oldMouseY%, 0    ;Return the mouse to the old location
    CoordMode Mouse, Relative
    return
}

Back