Help - Remote Apple Events: "Application isn't running."

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

Hi,

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

That works. Thank you so much!

Can anyone confirm that this will work between El Capitan and Leopard?