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

    Default My AHK File For Those With AHK + the simple macros they link to

    Code:
    SetKeyDelay, 0, 0
    WinGet, wowid, List, World of Warcraft
    
    #IfWinActive, World of Warcraft
    
    ; -------------------------------
    ;Determine Main and Clone Windows
    ; -------------------------------
    WinActivate, ahk_id %wowid1%
    
    MsgBox, 4,, Is this your WOW Main window? (press Yes or No)
    IfMsgBox Yes
    {
    idMain = %wowid1%
    idClone = %wowid2%
    } else {
    idMain = %wowid2%
    idClone = %wowid1%
    }
    ; -------------------------------
    
    ; -------------------------------
    ;
    ; -------------------------------
    ~Up::
    KeyWait Up
    ControlSend,, {NumPadSub}, ahk_id %idClone%
    Return
    
    ~LButton::
    ControlSend,, {NumPadAdd}, ahk_id %idClone%
    Sleep, 1100
    ControlSend,, {NumPadAdd}, ahk_id %idClone%
    Return
    
    ~=::
    KeyWait =
    ControlSend,, {=}, ahk_id %idClone%
    Return
    
    ~-::
    KeyWait, -, D
    ControlSend,, {-}, ahk_id %idClone%
    Return
    
    ;~a::
    ;While GetKeyState("a","D") = 1
       ;{
          ;If GetKeyState("a","D") = 1 ;
          ;{
             ;ControlSend,, {a}, ahk_id %idClone%
             ;Sleep, 1100
          ;}
       ;}
    ;return
    
    ~x::
    KeyWait, x, D
    ControlSend,, {x}, ahk_id %idClone%
    Return
    
    ~Tab::
    KeyWait, Tab, D
    ControlSend,, {Tab}, ahk_id %idClone%
    Return
    
    ~Shift::
    KeyWait, Shift, D
    ControlSend,, {Shift}, ahk_id %idClone%
    Return
    ; -------------------------------
    
    ; -------------------------------
    ; Numeric Keys + Numpad Keys
    ; -------------------------------
    ~1::
    KeyWait 1
    ControlSend,, {1}, ahk_id %idClone%
    Return
    
    ~2::
    KeyWait 2
    ControlSend,, {2}, ahk_id %idClone%
    Return
    
    ~3::
    KeyWait 3
    ControlSend,, {3}, ahk_id %idClone%
    Return
    
    ~4::
    KeyWait 4
    ControlSend,, {4}, ahk_id %idClone%
    Return
    
    ~5::
    KeyWait 5
    ControlSend,, {5}, ahk_id %idClone%
    Return
    
    ~6::
    KeyWait 6
    ControlSend,, {6}, ahk_id %idClone%
    Return
    
    ~7::
    KeyWait, 7, D
    ControlSend,, {7}, ahk_id %idClone%
    Return
    
    ~8::
    KeyWait, 8, D
    ControlSend,, {8}, ahk_id %idClone%
    Return
    
    ~9::
    KeyWait, 9, D
    ControlSend,, {9}, ahk_id %idClone%
    Return
    
    ~0::
    KeyWait, 0, D
    ControlSend,, {0}, ahk_id %idClone%
    Return
    
    ~NumPadDiv::
    KeyWait, NumPadDiv, D
    ControlSend,, {NumPadDiv}, ahk_id %idClone%
    Return
    
    ~NumPadMult::
    KeyWait, NumPadMult, D
    ControlSend,, {NumPadMult}, ahk_id %idClone%
    Return
    
    ~NumPadSub::
    KeyWait, NumPadSub, D
    ControlSend,, {NumPadSub}, ahk_id %idClone%
    Return
    
    ~NumPadAdd::
    KeyWait, NumPadAdd, D
    ControlSend,, {NumPadAdd}, ahk_id %idClone%
    Return
    
    ~NumPad1::
    KeyWait, NumPad1, D
    ControlSend,, {NumPad1}, ahk_id %idClone%
    Return
    
    ~NumPad2::
    KeyWait, NumPad2, D
    ControlSend,, {NumPad2}, ahk_id %idClone%
    Return
    
    ~NumPad3::
    KeyWait, NumPad3, D
    ControlSend,, {NumPad3}, ahk_id %idClone%
    Return
    
    ~NumPad4::
    KeyWait, NumPad4, D
    ControlSend,, {NumPad4}, ahk_id %idClone%
    Return
    
    ~NumPad5::
    KeyWait, NumPad5, D
    ControlSend,, {NumPad5}, ahk_id %idClone%
    Return
    
    ~NumPad6::
    KeyWait, NumPad6, D
    ControlSend,, {NumPad6}, ahk_id %idClone%
    Return
    
    ~NumPad7::
    KeyWait, NumPad7, D
    ControlSend,, {NumPad7}, ahk_id %idClone%
    Return
    
    ~NumPad8::
    KeyWait, NumPad8, D
    ControlSend,, {NumPad8}, ahk_id %idClone%
    Return
    
    ~NumPad9::
    KeyWait, NumPad9, D
    ControlSend,, {NumPad9}, ahk_id %idClone%
    Return
    
    ~NumPad0::
    KeyWait, NumPad0, D
    ControlSend,, {NumPad0}, ahk_id %idClone%
    Return
    ; -------------------------------
    
    ; -------------------------------
    ; F Keys
    ; -------------------------------
    ~F1::
    KeyWait, F1, D
    ControlSend,, {F1}, ahk_id %idClone%
    Return
    
    ~F2::
    KeyWait, F2, D
    ControlSend,, {F2}, ahk_id %idClone%
    Return
    
    ~F3::
    KeyWait, F3, D
    ControlSend,, {F3}, ahk_id %idClone%
    Return
    
    ~F4::
    KeyWait, F4, D
    ControlSend,, {F4}, ahk_id %idClone%
    Return
    
    ~F5::
    KeyWait, F5, D
    ControlSend,, {F5}, ahk_id %idClone%
    Return
    
    ~F6::
    KeyWait, F6, D
    ControlSend,, {F6}, ahk_id %idClone%
    Return
    
    ~F7::
    KeyWait, F7, D
    ControlSend,, {F7}, ahk_id %idClone%
    Return
    
    ~F8::
    KeyWait, F8, D
    ControlSend,, {F8}, ahk_id %idClone%
    Return
    
    ~F9::
    KeyWait, F9, D
    ControlSend,, {F9}, ahk_id %idClone%
    Return
    
    ~F10::
    KeyWait, F10, D
    ControlSend,, {F10}, ahk_id %idClone%
    Return
    
    ~F11::
    KeyWait, F11, D
    ControlSend,, {F11}, ahk_id %idClone%
    Return
    
    ~F12::
    KeyWait, F12, D
    ControlSend,, {F12}, ahk_id %idClone%
    Return
    ; -------------------------------
    I was seeing many instances of IF's from other files. #IfWinActive, World of Warcraft keeps you from having to repeat on every key. Same with WinGet, wowid, List, World of Warcraft.

    Code:
    WinActivate, ahk_id %wowid1%
    
    MsgBox, 4,, Is this your WOW Main window? (press Yes or No)
    IfMsgBox Yes
    {
    idMain = %wowid1%
    idClone = %wowid2%
    } else {
    idMain = %wowid2%
    idClone = %wowid1%
    }
    Is similar to the one found online. Minus the redundant IF found after it. Initially it was checking and setting on main on one If then setting on another If for clone. All from the same reply. With the same reply just have it respond together. If you multibox (I only dual). You may need to write in a conditional that if you select no. That it keeps stepping through the windows to ask you which one is the Main. Until you select yes.

    Code:
    ~Up::
    KeyWait Up
    ControlSend,, {NumPadSub}, ahk_id %idClone%
    Return
    Keybound to NumPadSub is the following basic macro:

    /targetenemy [noharm][dead]

    Code:
    ~LButton::
    ControlSend,, {NumPadAdd}, ahk_id %idClone%
    Sleep, 1100
    ControlSend,, {NumPadAdd}, ahk_id %idClone%
    Return
    Keybound to the Jamba add-on with this simple macro:

    /click JambaFTLAssist

    For those that need a short explaination. The above LButton AHK code fires the macro every time you left click something. This way you can have a one click targeting. Without having to select something, press a macro for it to target, etc.

    With them all being bound to numpad + & -. You can either use the keypress "up" for -, or select it on the keypad directly. Same with + you can left click a target. Or select + on the keypad directly.

    Was testing someone else's AHK file the other day for arrow keys. Such as if I wrote my up like so:

    Code:
    ~Up::
    KeyWait Up
    ControlSend,, Up, ahk_id %idClone%
    Return
    Which was noted to having been written around Sept 2012. However, do not think they tested it. In that used in WoW. That follow AHK code will not move the character. Over open windows. The code I have commented out for "a". Some of the wording are placeholders. So do not get caught up in it. I am thinking of a way that will work with W A S D keys when pressed. So that my slave will do all that I do via W A S D. Then leaving the arrow keys to me, with the exception of binding some of them to macros for slave. This will require interaction for each press and reaction. While you press and hold a key, the slave will essentially be pressing and holding the same key. Under WoW's ToU > one key press for one action. And that is what this follows. One key press and hold, for one action (movement).
    Last edited by Darkreign11 : 09-14-2012 at 01:52 PM

  2. #2

    Default

    1. I'm gonna take look at the clonepush once I get home. A sample script I found for clonepush did not work.
    2. Good thinking with the ~Lbutton. I'm definitely going to use that.
    3. Is there a reason why you use KeyWait 5 instead of KeyWait, 5, D?
    Last edited by aasi888 : 09-15-2012 at 10:02 AM

  3. #3

    Default

    Quote Originally Posted by aasi888 View Post
    1. I'm gonna take look at the clonepush once I get home. A sample script I found for clonepush did not work.
    2. Good thinking with the ~Lbutton. I'm definitely going to use that.
    3. Is there a reason why you use KeyWait 5 instead of KeyWait, 5, D?
    Noticed that myself. Most of this code was from previous files I found online. I only edited and added some things in. Fixing the mentioned code and codes to be reflective of the others.

    Here are the WoW movement keys I made:
    Code:
    ; -------------------------------
    ; Movement Keys
    ; -------------------------------
    ~w::
    While GetKeyState("w","P") = 1
       {
          ControlSend,, {w down}, ahk_id %idClone%
       }
    If GetKeyState("w","P") = 0
       {
          ControlSend,, {w up}, ahk_id %idClone%
       }
    return
    
    ~a::
    While GetKeyState("a","P") = 1
       {
          ControlSend,, {a down}, ahk_id %idClone%
       }
    If GetKeyState("a","P") = 0
       {
          ControlSend,, {a up}, ahk_id %idClone%
       }
    return
    
    ~s::
    While GetKeyState("s","P") = 1
       {
          ControlSend,, {s down}, ahk_id %idClone%
       }
    If GetKeyState("s","P") = 0
       {
          ControlSend,, {s up}, ahk_id %idClone%
       }
    return
    
    ~d::
    While GetKeyState("d","P") = 1
       {
          ControlSend,, {d down}, ahk_id %idClone%
       }
    If GetKeyState("d","P") = 0
       {
          ControlSend,, {d up}, ahk_id %idClone%
       }
    return
    
    ~q::
    While GetKeyState("q","P") = 1
       {
          ControlSend,, {q down}, ahk_id %idClone%
       }
    If GetKeyState("q","P") = 0
       {
          ControlSend,, {q up}, ahk_id %idClone%
       }
    return
    
    ~e::
    While GetKeyState("e","P") = 1
       {
          ControlSend,, {e down}, ahk_id %idClone%
       }
    If GetKeyState("e","P") = 0
       {
          ControlSend,, {e up}, ahk_id %idClone%
       }
    return
    Last edited by Darkreign11 : 09-20-2012 at 11:57 AM

  4. #4

    Default

    Then you can also use:

    Code:
    ~Enter::
    Suspend,toggle
    Return

Posting Rules

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