Darkwind - Viewing Topic: Hotkeys via AutoHotKey
Welcome Guest! » Darkwind » Discussion » Darkwind Discussion » Hotkeys via AutoHotKey

Pages: << prev 1 next >> Reply to Topic Create New Topic Create New Poll
Hotkeys via AutoHotKey, How to use AutoHotKey in DW
nbk_redspy
Greasy Bolts
Sunday Driver

Renegade

Member Level

Group: Members
Posts: 59
Joined: May 13, 2009

Send an email to nbk_redspy Send a personal messsage to nbk_redspy Reply with a quote from this post Go to the top of the page

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
}
.........................
vet wv

Posted Jun 20, 2009, 8:48 am
Reply to Topic Create New Topic Create New Poll E-mail me when replies are made to this topic View Printable
» Darkwind » Discussion » Darkwind Discussion » Hotkeys via AutoHotKey

0.1654 seconds - 11 queries - 0.42 load