Easier flipping of tiles, move map with right mouse

Discussion in 'Custom Scenarios and Boards' started by Aiven, Jan 24, 2014.

  1. Aiven

    Aiven Orc Soldier

    I found the interaction with the map editor to be a bit clunky by default, so I knew I had to try and improve it. I found out that I wanted it all on my gaming mouse. I wrote some lines of code in autohotkey and also got some help from people that are smarter than me. Hence I have made a script that rotates tiles 90 degrees with my mouse 4, 180 degrees with my mouse 5 and moves the map by holding the right mouse button. I hope more people than me finds this convenient.

    Code:
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
    ; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    #IfWinActive, Card Hunter
     
    K := 0
    Xbutton1::
    l := mod(k, 2)
    if (l = 0)
    send, x
    else
    send, y
    K := K + 1
    return
     
    Xbutton2::
    Send xy
    Return
     
    RButton::
    SendInput {Ctrl down}{LButton down}
    Keywait, RButton
    SendInput {LButton up}{Ctrl up}
    Return

    Included in the zip file is an ahk-file (viewable in any text editor) and an exe-file. The ahk works with autohotkey installed, the exe file works on any windows box.

    If you are suspicious of exe files from stranges on the internet, which you should be, I recommend downloading autohotkey and running the ahk file through that. It's light weight, free and open source.
     

    Attached Files:

    neoncat likes this.

Share This Page