• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: run script on remote machine stops working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run script on remote machine stops working


  • Subject: Re: run script on remote machine stops working
  • From: deivy petrescu <email@hidden>
  • Date: Thu, 10 Jun 2004 18:19:20 -0400

On Jun 10, 2004, at 12:40 PM, matt neuburg wrote:

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.


"it used to work now it does not", welcome to remote machine scripting, as you put it.
To make your script work, change the following:

set m to "eppc://mattneub:email@hidden"
tell application "Finder" of machine m

to

tell application "Finder" of machine "eppc://mattneub:email@hidden"
it should be fine.
You can go straight to "System Events" if you want to.

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. :)


It precedes the security fix.

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.


If you drop your "m" for the actual IP you can drop using terms from.

Regards
Saudagues

deivy petrescu
http://www.dicas.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.


  • Prev by Date: Re: Need to rename files/folders - zsh shell
  • Next by Date: Re: Coercion problem
  • Previous by thread: run script on remote machine stops working
  • Next by thread: Re: run script on remote machine stops working
  • Index(es):
    • Date
    • Thread