Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 27, 2007, 09:53 AM   #1
Keytachi
macrumors regular
 
Join Date: Sep 2006
Dual-Boxing on WoW - Duplicating Keystrokes

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?
__________________
Unibody Macbook Pro, 2.66GHz, 4GB Ram, 9600M GT.
Give. Me. Fiber! (Optics).
Keytachi is offline   0 Reply With Quote
Old Aug 27, 2007, 01:41 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
Check out this old thread, which contains some sample code.
kainjow is offline   0 Reply With Quote
Old Aug 27, 2007, 02:21 PM   #3
Keytachi
Thread Starter
macrumors regular
 
Join Date: Sep 2006
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?
__________________
Unibody Macbook Pro, 2.66GHz, 4GB Ram, 9600M GT.
Give. Me. Fiber! (Optics).

Last edited by Keytachi; Aug 27, 2007 at 02:27 PM.
Keytachi is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
nMP 6,1 USB Keyboard missing keystrokes - Intermittently WillyWoo Mac Pro 0 Jan 23, 2014 09:55 AM
Duplicating files Labels chris-17 OS X 0 Oct 21, 2013 10:08 AM
App to send Keystrokes to Mac Baklava iPhone and iPod touch Apps 0 May 25, 2013 12:15 PM
Erratic random keystrokes SamanthaJane1 iPad Tips, Help and Troubleshooting 1 Dec 2, 2012 04:42 PM
Occasional dead keystrokes? brudog68 iPhone 3 Sep 22, 2012 06:03 AM

Forum Jump

All times are GMT -5. The time now is 07:29 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC