Close
Showing results 1 to 5 of 5
  1. #1

    Default Emergency movement with AutoHotkey

    Hi, I'm wondering if there's a way to recognize key downs and key ups as separate events.

    #IfWinActive, World of Warcraft
    ~^w::
    ControlSend,,{Ctrl down}{w down}{w up}{Ctrl up}, ahk_id %idClone%
    return

    I'm trying to make it so that when I hold down control, it will make my clone move the same way. However, this is using the same format as when just pressing a single keystroke, like 1-9 for spells. If i try to hold down W, the clone will rapidly start and stop resulting in amusing, (and very very slow) forward twitching movements. Is there any way to measure an event, when I press down W it will keep moving until i release W?
    Jenzali - Troll Druid (Level 85) - Emerald Dream
    Soon to be joined by 4 other Druid buddies!

  2. #2

    Default

    The following uses the cursor keys (arrow keys between qwerty and number pad) to move all Alts (but not main) forward, backward, and turning left and right, for as long as the key is pressed down.

    Please note on the Alt machines I have my movement keys bounded to SDFE, rather then blizzard's default ASDW. You can change the below to however you like.

    I notice you use the %idMain% and %idClone%, so you can just delete 3 of the 4 lines and change the remaining one from %wowidX% to %idClone%.

    up::
    KeyWait, up, D
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {E Down}, ahk_id %wowid2%
    ControlSend,, {E Down}, ahk_id %wowid3%
    ControlSend,, {E Down}, ahk_id %wowid4%
    ControlSend,, {E Down}, ahk_id %wowid5%
    }
    Return

    up Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {E Up}, ahk_id %wowid2%
    ControlSend,, {E Up}, ahk_id %wowid3%
    ControlSend,, {E Up}, ahk_id %wowid4%
    ControlSend,, {E Up}, ahk_id %wowid5%
    }
    Return

    down::
    KeyWait, Down, D
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {D Down}, ahk_id %wowid2%
    ControlSend,, {D Down}, ahk_id %wowid3%
    ControlSend,, {D Down}, ahk_id %wowid4%
    ControlSend,, {D Down}, ahk_id %wowid5%
    }
    Return

    down Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {D Up}, ahk_id %wowid2%
    ControlSend,, {D Up}, ahk_id %wowid3%
    ControlSend,, {D Up}, ahk_id %wowid4%
    ControlSend,, {D Up}, ahk_id %wowid5%
    }
    Return

    left::
    KeyWait, left, D
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {S Down}, ahk_id %wowid2%
    ControlSend,, {S Down}, ahk_id %wowid3%
    ControlSend,, {S Down}, ahk_id %wowid4%
    ControlSend,, {S Down}, ahk_id %wowid5%
    }
    Return

    left Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {S Up}, ahk_id %wowid2%
    ControlSend,, {S Up}, ahk_id %wowid3%
    ControlSend,, {S Up}, ahk_id %wowid4%
    ControlSend,, {S Up}, ahk_id %wowid5%
    }
    Return

    right::
    KeyWait, right, D
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {F Down}, ahk_id %wowid2%
    ControlSend,, {F Down}, ahk_id %wowid3%
    ControlSend,, {F Down}, ahk_id %wowid4%
    ControlSend,, {F Down}, ahk_id %wowid5%
    }
    Return

    right Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {F Up}, ahk_id %wowid2%
    ControlSend,, {F Up}, ahk_id %wowid3%
    ControlSend,, {F Up}, ahk_id %wowid4%
    ControlSend,, {F Up}, ahk_id %wowid5%
    }
    Return



    Lokked
    "For God's sake, don't stand there at 30 yards trying to cast a spell, he will melt your face period."

    Lokked

  3. #3

    Default

    without having a wowid1 if you change focus to a second screen does this script break? I havnt tried without wowid1 but I would like to know if thats a problem i might be having, wasnt aware it would work this way.
    [align=right][ http://theoptimen.blogspot.com | Level 70 5 Boxer- [A] Frostmourne US ]
    [ 5 Shamans, 1 Druid & 1 Warrior - Mix & Match ]
    [/align]

  4. #4

    Default

    up::
    KeyWait, up, Up
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Up Down}, ahk_id %idClone%
    }
    Return

    up Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Up Up}, ahk_id %idClone%
    }
    Return

    down::
    KeyWait, Down, Down
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Down Down}, ahk_id %idClone%
    }
    Return

    down Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Down Up}, ahk_id %idClone%
    }
    Return

    left::
    KeyWait, left, Left
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Left Down}, ahk_id %idClone%
    }
    Return

    left Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Left Up}, ahk_id %idClone%
    }
    Return

    right::
    KeyWait, right, Right
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Right Down}, ahk_id %idClone%
    }
    Return

    right Up::
    #IfWinActive, World of Warcraft
    {
    ControlSend,, {Right Up}, ahk_id %idClone%
    }
    Return

    I'm using this, and the character seems to turn and move backwards properly. However whenever I press forward he runs forward indefinitely and I can't stop him unless i turn off autohotkey.
    Jenzali - Troll Druid (Level 85) - Emerald Dream
    Soon to be joined by 4 other Druid buddies!

  5. #5

    Default

    To be honest with you, I couldn't get it to work properly worth a damn using the cursor keys on the alts, the way you have it.

    Also, your sintax for Keywait is incorrect, and is probably the root of your problem:

    Keywait, up, D

    Keywait, down, D

    etc...

    The D specifies that Keywait is waiting for the XXX key to be pressed DOWN before doing anything else with the following script. It is not simply a reiteration of the desired keypress.

    The way you currently have it, your Keywait command is most likely either not functioning at all, or just ignoring the faulty sintax.

    I translated a cursor key press on my main PC keyboard into the Alpha movement keys on the alts' windows (ESDF in my case, by default it is WASD for up, left, down and right, respectively) because I couldn't get the Alts' cursor movements to work properly.

    Lokked
    "For God's sake, don't stand there at 30 yards trying to cast a spell, he will melt your face period."

    Lokked

Similar Threads

  1. Emergency CC macros?
    By emesis in forum Macros and Addons
    Replies: 7
    Last Post: 03-25-2009, 11:50 AM
  2. autohotkey movement problems
    By microgx in forum Software Tools
    Replies: 2
    Last Post: 09-15-2008, 12:56 PM
  3. Autohotkey Befehl für Char Movement
    By Extreme in forum German
    Replies: 11
    Last Post: 05-04-2008, 07:11 AM
  4. Mass emergency sheeping
    By kllrwlf in forum Macros and Addons
    Replies: 4
    Last Post: 01-03-2008, 04:20 PM
  5. Emergency!! help plz!
    By Timespiral in forum New Multi-Boxers & Support
    Replies: 4
    Last Post: 12-18-2007, 08:16 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
  •