Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
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:
Code:
WinGet, wowid, List, World of Warcraft 

~2:: 
KeyWait 2 
IfWinActive, World of Warcraft 
{ 
ControlSend,, 2, ahk_id %wowid1% 
ControlSend,, 2, ahk_id %wowid2% 
Return 
}
now, how can i do that in applescript, and in a way to be always active?
 

Keytachi

macrumors regular
Original poster
Sep 14, 2006
161
0
thank you! that helpe alot.
i came up with this script:
Code:
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.