Re: Telling remote computer to "do shell script"
Re: Telling remote computer to "do shell script"
- Subject: Re: Telling remote computer to "do shell script"
- From: Christopher Nebel <email@hidden>
- Date: Tue, 2 Dec 2003 11:54:54 -0800
On Dec 2, 2003, at 7:51 AM, Chris Garaffa wrote:
On Dec 2, 2003, at 2:21 AM, Michael Terry wrote:
On Dec 1, 2003, at 2:19 PM, Michael Terry wrote:
Hey, telling AppleScript what to do is useful for something! I've
never scripted networked computers, but this works for me:
tell machine "eppc://localhost" to tell AppleScript
do shell script "echo hello"
end tell
But doesn't, as it turns out, mean anything. I tried localhost, but
it seems you can tell "127.0.01" or "10.0.0.1" or "Britney" or "" or
nothing at all and the above will work, but only in the sense that
it's calling a command on one's own machine.
Noticed this after getting a message from a suspicious Christopher
Nebel.
Right, because "AppleScript" means the AppleScript instance that's
running the script. There has been some discussion of creating a
notion of the system as a whole (as opposed to a particular
application) so you could simply "tell machine ..." or some such; for
the time being, System Events is the closest equivalent.
If only that syntax worked... it would seem to be exactly what I want.
Maybe Christopher Nebel can comment on a way to accomplish this? For
now I guess I'll have to hack something else together.
Telling an application that's running on the remote system (such as the
Finder) should work, as should telling System Events, since there are
special hooks to launch it if it's not running. Certain scripting
commands will refuse to work on a remote machine, but "do shell script"
isn't one of them. Can you get remote commands to work at all? A few
obvious things to check:
- Can you actually see the address you're sending to? Try pinging it
using Network Utility or ping(8).
- Are Remote Apple Events turned on in the target machine's Sharing
preferences? They're off by default.
--Chris Nebel
AppleScript Engineering
_______________________________________________
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.