Close
Showing results 1 to 2 of 2
  1. #1
    Anonymous
    Guest

    Default AutoHotKey HELP!!!!! Sorry about the post in the hardware

    I'm having an issue getting my characters to move together, either my main character moves the opposite way i tell him to (through the w,a,s,d keys) or the other character doesn't move at all, here's my script:

    WinGet, wowid, List, World of Warcraft

    WinGet, wowid, List, World of Warcraft

    ~1::
    KeyWait 1
    IfWinActive, World of Warcraft
    {
    ControlSend,, 1, ahk_id %wowid1%
    ControlSend,, 1, ahk_id %wowid2%
    Return
    }

    ~2::
    KeyWait 2
    IfWinActive, World of Warcraft
    {
    ControlSend,, 2, ahk_id %wowid1%
    ControlSend,, 2, ahk_id %wowid2%
    Return
    }

    ~3::
    KeyWait 3
    IfWinActive, World of Warcraft
    {
    ControlSend,, 3, ahk_id %wowid1%
    ControlSend,, 3, ahk_id %wowid2%
    Return
    }

    ~4::
    KeyWait 4
    IfWinActive, World of Warcraft
    {
    ControlSend,, 4, ahk_id %wowid1%
    ControlSend,, 4, ahk_id %wowid2%
    Return
    }

    ~5::
    KeyWait 5
    IfWinActive, World of Warcraft
    {
    ControlSend,, 5, ahk_id %wowid1%
    ControlSend,, 5, ahk_id %wowid2%
    Return
    }

    ~6::
    KeyWait 6
    IfWinActive, World of Warcraft
    {
    ControlSend,, 6, ahk_id %wowid1%
    ControlSend,, 6, ahk_id %wowid2%
    Return
    }

    ~7::
    KeyWait 7
    IfWinActive, World of Warcraft
    {
    ControlSend,, 8, ahk_id %wowid1%
    ControlSend,, 8, ahk_id %wowid2%
    Return
    }

    ~8::
    KeyWait 8
    IfWinActive, World of Warcraft
    {
    ControlSend,, 8, ahk_id %wowid1%
    ControlSend,, 8, ahk_id %wowid2%
    Return
    }

    ~9::
    KeyWait 9
    IfWinActive, World of Warcraft
    {
    ControlSend,, 9, ahk_id %wowid1%
    ControlSend,, 9, ahk_id %wowid2%
    Return
    }

    ~0::
    KeyWait 0
    IfWinActive, World of Warcraft
    {
    ControlSend,, 0, ahk_id %wowid1%
    ControlSend,, 0, ahk_id %wowid2%
    Return
    }

    ~-::
    KeyWait -
    IfWinActive, World of Warcraft
    {
    ControlSend,, -, ahk_id %wowid1%
    ControlSend,, -, ahk_id %wowid2%
    Return
    }

    ~=::
    KeyWait =
    IfWinActive, World of Warcraft
    {
    ControlSend,, =, ahk_id %wowid1%
    ControlSend,, =, ahk_id %wowid2%
    Return
    }

    ~w::
    KeyWait w
    IfWinActive, World of Warcraft
    {
    ControlSend,, {w Down}, ahk_id %wowid1%
    ControlSend,, {w Down}, ahk_id %wowid2%
    Return
    }

    ~a::
    KeyWait a
    IfWinActive, World of Warcraft
    {
    ControlSend,, {a Down}, ahk_id %wowid1%
    ControlSend,, {a Down}, ahk_id %wowid2%
    Return
    }

    ~s::
    KeyWait s
    IfWinActive, World of Warcraft
    {
    ControlSend,, {s Down}, ahk_id %wowid1%
    ControlSend,, {s Down}, ahk_id %wowid2%
    Return
    }

    ~d::
    KeyWait d
    IfWinActive, World of Warcraft
    {
    ControlSend,, {d Down}, ahk_id %wowid1%
    ControlSend,, {d Down}, ahk_id %wowid2%
    Return
    }

    ~w Up::
    KeyWait w
    IfWinActive, World of Warcraft
    {
    ControlSend,, {w Up}, ahk_id %wowid1%
    ControlSend,, {w Up}, ahk_id %wowid2%
    Return
    }

    ~a Up::
    KeyWait a
    IfWinActive, World of Warcraft
    {
    ControlSend,, {a Up}, ahk_id %wowid1%
    ControlSend,, {a Up}, ahk_id %wowid2%
    Return
    }

    ~s Up::
    KeyWait s
    IfWinActive, World of Warcraft
    {
    ControlSend,, {s Up}, ahk_id %wowid1%
    ControlSend,, {s Up}, ahk_id %wowid2%
    Return
    }

    ~d Up::
    KeyWait d
    IfWinActive, World of Warcraft
    {
    ControlSend,, {d Up}, ahk_id %wowid1%
    ControlSend,, {d Up}, ahk_id %wowid2%
    Return
    }

    Just curious what I'm doing wrong

  2. #2

    Default

    ok for a start you are passing through the key press and then also sending it to your main, this will result in 2x w... try it in a chat box... v annoying


    the ~ means pass the button press through to your active window and also do anything in the procedure

    I also found that keywait was not as good as testing for the key up condition

    try something like...

    [code:1]
    w::
    ControlSend,, {w Down}, ahk_id %wowid1%
    ControlSend,, {w Down}, ahk_id %wowid2%
    Return

    w Up::
    ControlSend,, {w Up}, ahk_id %wowid1%
    ControlSend,, {w Up}, ahk_id %wowid2%
    Return
    [/code:1]

    Another thing... the line

    [code:1]#IfWinActive, World of Warcraft[/code:1]

    can be specified once in the script... everything below this line is considered to be governed by it

    I put all my general commands above this line and all the WOW specifics below it. it just makes the script easier to read.

    anyway, I hope this helps

Similar Threads

  1. Replies: 35
    Last Post: 05-30-2009, 12:05 PM
  2. Replies: 10
    Last Post: 05-12-2009, 03:17 AM
  3. Post your Team post WOTLK
    By DeathRush in forum General WoW Discussion
    Replies: 20
    Last Post: 10-13-2008, 05:44 AM
  4. Hardware Link Post Gone
    By Valok in forum Hardware Tools
    Replies: 1
    Last Post: 06-27-2008, 05:38 PM
  5. Replies: 31
    Last Post: 10-05-2007, 06:55 AM

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •