run script on remote machine stops working
run script on remote machine stops working
- Subject: run script on remote machine stops working
- From: matt neuburg <email@hidden>
- Date: Thu, 10 Jun 2004 09:40:47 -0700
This script, on page 351 of my book, used to work (else, I would not have
published it):
set m to "eppc://mattneub:email@hidden"
tell application "Finder" of machine m
set s to (run script "path to app \"System Events.app\" as string")
open item s
end tell
set se to "System Events"
tell application se of machine m
using terms from application "System Events"
get every process
end using terms from
end tell
It is assumed that the username, password, and computer name are real, and
the Remove Events sharing is turned on at the target machine. The purpose of
the script is to demonstrate how to start up an app on a remote machine so
that you can start scripting it. The trick is to learn where that app is.
The script used to work, as I say; but it now errors out at runtime on the
"run script" line.
I wonder whether this breakage is due to some sort of recent security fix? I
can certainly see why allowing an arbitrary script to be executed through
"run script" would be regarded as a possible security hazard. :)
In any case, here is a workaround:
set m to "eppc://mattneub:email@hidden"
tell application "Finder" of machine m
using terms from application "Finder"
set s to get application file id "sevs" as string
open item s
end using terms from
end tell
set se to "System Events"
tell application se of machine m
using terms from application "System Events"
get every process
end using terms from
end tell
But perhaps readers of this list have a better workaround, or comments, or
something? m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.