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

    Default ctrl-modifier issues

    ok please don't tell me to read the stickies because i've read the ahk sticky over and over

    i am trying to get it so that when i hit ctrl-1 (hotkey for telling pet to attack) that it send both my main and my alts pet in to attack the target...
    i have
    Code:
    #IfWinActive, World of Warcraft
    ~^1::
    ControlSend,,{Ctrl down}{1 down}{1 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{1 down}{1 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^2::
    ControlSend,,{Ctrl down}{2 down}{2 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{2 down}{2 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^3::
    ControlSend,,{Ctrl down}{3 down}{3 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{3 down}{3 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^4::
    ControlSend,,{Ctrl down}{4 down}{4 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{4 down}{4 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^5::
    ControlSend,,{Ctrl down}{5 down}{5 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{5 down}{5 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^6::
    ControlSend,,{Ctrl down}{6 down}{6 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{6 down}{6 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^7::
    ControlSend,,{Ctrl down}{7 down}{7 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{7 down}{7 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^8::
    ControlSend,,{Ctrl down}{8 down}{8 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{8 down}{8 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^9::
    ControlSend,,{Ctrl down}{9 down}{9 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{9 down}{9 up}{Ctrl up}, ahk_id %idClone%
    return
    
    #IfWinActive, World of Warcraft
    ~^0::
    ControlSend,,{Ctrl down}{0 down}{0 up}{Ctrl up}, ahk_id %idMain%
    ControlSend,,{= down}{= up}, ahk_id %idClone%
    ControlSend,,{Ctrl down}{0 down}{0 up}{Ctrl up}, ahk_id %idClone%
    return
    it doesn't seem to work
    "You're pro or you're a noob. That's life."

  2. #2

    Default

    Try this:
    Code:
    ClonesPush(strKeys)
    {
    	global WowWinId1
    	global WowWinId2
    	IfWinNotActive, ahk_id %WowWinId1%
    		ControlSend, , %strKeys%, ahk_id %WowWinId1%
    	IfWinNotActive, ahk_id %WowWinId2%
    		ControlSend, , %strKeys%, ahk_id %WowWinId2%
    }
    
    WinGet, WowWinId, List, World of Warcraft
    
    #IfWinActive, World of Warcraft
    
    ~^1::ClonesPush("{Ctrl down}{1 down}{1 up}{Ctrl up}")
    ~^2::ClonesPush("{Ctrl down}{2 down}{2 up}{Ctrl up}")
    ~^3::ClonesPush("{Ctrl down}{3 down}{3 up}{Ctrl up}")
    ~^4::ClonesPush("{Ctrl down}{4 down}{4 up}{Ctrl up}")
    ~^5::ClonesPush("{Ctrl down}{5 down}{5 up}{Ctrl up}")
    ~^6::ClonesPush("{Ctrl down}{6 down}{6 up}{Ctrl up}")
    ~^7::ClonesPush("{Ctrl down}{7 down}{7 up}{Ctrl up}")
    ~^8::ClonesPush("{Ctrl down}{8 down}{8 up}{Ctrl up}")
    ~^9::ClonesPush("{Ctrl down}{9 down}{9 up}{Ctrl up}")
    ~^0::ClonesPush("{Ctrl down}{0 down}{0 up}{Ctrl up}")

Similar Threads

  1. Sticky CTRL & ALT modifiers after CTRL-ALT-DEL?
    By emesis in forum Software Tools
    Replies: 4
    Last Post: 02-25-2009, 10:51 AM
  2. mod:ctrl not working?
    By Zuco in forum Macros and Addons
    Replies: 2
    Last Post: 07-09-2008, 02:55 AM
  3. mod:ctrl not working?
    By Hypermoo in forum Macros and Addons
    Replies: 2
    Last Post: 05-12-2008, 11:45 AM
  4. Modifier Keys and not passing issues
    By zanthor in forum Software Tools
    Replies: 0
    Last Post: 04-10-2008, 07:45 PM
  5. caps > ctrl
    By unit187 in forum General WoW Discussion
    Replies: 7
    Last Post: 03-27-2008, 02:07 PM

Posting Rules

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