Re: Can't make remote AppleEvents work
Re: Can't make remote AppleEvents work
- Subject: Re: Can't make remote AppleEvents work
- From: Sander Tekelenburg <email@hidden>
- Date: Thu, 17 Jun 2004 16:55:36 +0200
At 07:50 -0400 UTC, on 2004-06-17, deivy petrescu wrote:
[...]
>
On Jun 17, 2004,12:10:40 AM , Sander Tekelenburg wrote:
>
>
> All in all scripting remote Macs seem to not work in a useful manner
>
> (for me) thus far. Very annoying. I'm suprised, because my impression
>
> was that many people use it.
>
>
What kind of problems are you having?
Short answer: still more problems when a passphrase contains a hash
Long answer:
tell application "Finder" of machine "eppc://192.168.0.102" to beep
When I provide the passphrase (encoding any hashes as #), it works. Both
from Script Editor and as an applet.
When I add the passphrase to Keychain and then run the script, both Script
Editor and the applet crash.
When I change the script to contain the user/passphrase:
tell application "Finder" of machine
"eppc://[user:passphrase]@192.168.0.102" to beep
it initially works from Script Editor. When I then save as an applet, then
upon running it the applet tells me "Could not establish connection to host".
When then opening the applet in Script Editor, the script won't compile,
saying "Syntax Error. Remote access isn't allowed."
When I then change the script to the original again (taking out the
user/passphrase from the eppc URL), compiling still returns the same: "Syntax
Error. Remote access isn't allowed."
The only way to then change the script is to quit Script Editor, launch it
again, and write a new script from scratch (well, you can copy the old
script before quitting SE, then paste it into the new script when you launch
SE again). SE seems to cache the failed attempt to talk to the remote machine
and the only way to start fresh is to quit SE and start with a new script.
FWIW, all the above applies to using that same account and encoding the
passphrase's hash. I just found that using another admin account, with no
hash in the passphrase, seems to work in all the ways that it should. Still,
there seem to be more factors involved in making remote-scripting-life
impossible than just the hash not being encoded by the eppc authentication
dialog:
- storing the encoded passphrases in the script's eppc URL should work - it
doesn't
- storing the encoded passphrase in Keychain should work - it doesn't
- when that doesn't, a useful error message would be nicer than a plain crash
- it's absolutely maddening that SE apparently caches the failed attempt to
talk to a remote machine and never tries again when you change your code and
try to compile it. Being forced to quit SE and start a new script for every
single change of code makes figuring out what's wrong and how to work around
it take 10 times as long. (I had already given up. Only this new thread gave
me the energy to give it one last shot.)
--
Sander Tekelenburg, <
http://www.euronet.nl/~tekelenb/>
_______________________________________________
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.