Re: Re: How can we execute remote AppleScript?
Re: Re: How can we execute remote AppleScript?
- Subject: Re: Re: How can we execute remote AppleScript?
- From: Jim Skibbie <email@hidden>
- Date: Mon, 09 Nov 2009 15:52:56 -0800
- Thread-topic: How can we execute remote AppleScript?
Title: Re: Re: How can we execute remote AppleScript?
Chris-
Is there a way to execute a script remotely where you can also pass arguments to the remote script?
Machine A: needs to run script on Machine B, but the script needs a few arguments to run.
Machine B: has the local script to run, needs the remote ‘tell’ but also needs the arguments passed to it.
Thanks.
Jim
On Apr 3, 2007, at 5:04 PM, Jon Pugh wrote:
At 3:43 PM -0500 4/3/07, Wallace, William wrote:
Does anybody else have any insights on this, because I'd like to know the
answer too (this could be very useful to me if I can get it to work
reliably). I get a "user authentication failure" error. I am using a valid
username/password combo, and have verified that remote apple events are
enabled.
I don't know that this is the problem, but it may simply be that you are not allowed to run osaxen (like beep and run script) remotely. There used to be an osiz resource which specified if an osax was allowed to run remotely. I'm not sure if there's any corresponding technique to allow or prevent remote osaxen these days.
Indeed, "run script" does not allow remote execution -- it's a security thing. In general, scripting addition commands that trigger user interface are not allowed to run, though you can still annoy the heck out of the remote user with "beep" and "say". [1]
Alternatively, if the target application is an AppleScript applet, declare a handler: you can then "tell" the application remotely to execute that handler. You could even deliberately circumvent the security by declaring a handler like this:
on my_run_script(s)
run script s
end
To answer William's question, the remote/local check is done in code these days; there's no simple way to turn it off.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden