This is my first attempt to script an event on a remote Mac that has Remote Apple Events enabled. I keep getting the error “Application isn’t running.”
Here is a simple test that I am trying to activate spotlight. Any idea what I’m doing wrong?
set remMachine to eppc://remoteIP
using terms from application "System Events"
tell application "System Events" of machine remMachine
keystroke space using command down
end tell
end using terms from
normally System Events is not running on the remote machine, so use this trick to launch it
set remMachine to "eppc://remoteIP"
using terms from application "Finder"
tell application "Finder" of machine remMachine
get processes -- this causes System Events to launch
end tell
end using terms from
using terms from application "System Events"
tell application "System Events" of machine remMachine
keystroke space using command down
end tell
end using terms from
the Finder responds to the keyword process but passes the task to System Events