Trigger keystrokes on a remote Mac

Hi all,

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

Posted on Feb 9, 2010 11:36 PM

Reply
7 replies

Feb 13, 2010 12:45 PM in response to nate12345

Hi Nate,

Thanks for your response. I don't see a place to enable UI scripting in the Universal Access pref panel - I'm still running Leopard so is that maybe not an option?

Enable Access for Assistive Devices is selected in the UA pref panel, and I've also selected Remote Apple Events in the Sharing pref panel.

Am I just missing the UI scripting option somewhere?

Thanks again!

Dave

Feb 13, 2010 1:35 PM in response to mellodee22

mellodee22 wrote:
Hi Nate,

Thanks for your response. I don't see a place to enable UI scripting in the Universal Access pref panel - I'm still running Leopard so is that maybe not an option?

Enable Access for Assistive Devices is selected in the UA pref panel, and I've also selected Remote Apple Events in the Sharing pref panel.

There one & the same. Did you do it also on the remote machine?

Feb 15, 2010 2:10 PM in response to nate12345

Hi Nate,

I have been able to successfully run a test script directly on the target Mac (not across the the network) - the script that works is in my first post of this thread. I just can't seem to get the wording correct to make it work remotely.

Thank you for your efforts, though - I really appreciate it, as well as any further ideas/suggestions.

Dave

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Trigger keystrokes on a remote Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.