Dual-Boxing on WoW - Duplicating Keystrokes

Discussion in 'Mac Programming' started by Keytachi, Aug 27, 2007.

  1. macrumors regular

    Sep 14, 2006
    i wanted to know how can i, by pressing one key, send the same key information, to two different WoW clients. Windows has the AutoHotkey program, and i thought i could to the same with AppleScript. However, AHK is an actual program, that reads the scripts. here is an example of the script to send the key "2" to two different wow clients:
    WinGet, wowid, List, World of Warcraft 
    KeyWait 2 
    IfWinActive, World of Warcraft 
    ControlSend,, 2, ahk_id %wowid1% 
    ControlSend,, 2, ahk_id %wowid2% 
    now, how can i do that in applescript, and in a way to be always active?
  2. Moderator emeritus


    Jun 15, 2000
    Check out this old thread, which contains some sample code.
  3. thread starter macrumors regular

    Sep 14, 2006
    thank you! that helpe alot.
    i came up with this script:
    tell application "System Events"
    	if application "World of Warcraft" is front and (keystroke "1" is press) then
    		tell application "World of Warcraft1"
    			keystroke "1"
    		end tell
    	end if
    end tell
    now, does that do what i want? and how can i make that "eternal", something like a daemon?

Share This Page