Trigger keystrokes on a remote Mac
I'm trying to write an AppleScript that will trigger keystrokes on a remote Mac. I'm able to write an AS that will send keystrokes to programs on the local computer, plus I'm able to send an AS to trigger shortcuts in QuicKeys on the remote computer (which then send keystrokes to the app I'm trying to trigger), but it would be nicer/simpler/faster responding to be able to trigger the keystrokes directly.
Here is my AS that works on the same (local) computer:
tell application "Sibelius 6"
activate
end tell
tell application "System Events"
tell process "Sibelius 6"
keystroke "h"
end tell
end tell
The above works great. I thought it would be as simple as adding the eppc info of my remote Mac to the above script, but that didn't work.
The following is my script that works by triggering QuicKeys on the remote computer (the QK shortcut sends an "h" to Sibelius):
tell application "QuicKeys" of machine "eppc://xx.x.x.xx"
play shortcut named "Hairpin crescendo"
end tell
Again, the above works great triggering QuicKeys, but it doubles the amount of work it takes to do the job (I have to write both the AppleScript and the QuicKeys shortcut), plus adds a very small amount of latency to the process.
By the way, I'm using a touchscreen connected to an old MacBook Pro to trigger the AppleScripts, controlling Sibelius on the remote (my main computer) Mac Pro.
Thanks in advance for any ideas!
Many Macs