• 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: Can't make remote AppleEvents work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't make remote AppleEvents work


  • Subject: Re: Can't make remote AppleEvents work
  • From: Ken Tozier <email@hidden>
  • Date: Thu, 17 Jun 2004 11:19:00 -0400

FWIW I've been getting many of the same errors as Sander. Haven't tried keychain and my pass phrase doesn't contain a hash code so that one didn't apply in my case. But the "cannot connect" and "remote access not allowed" is basically all I'm getting for my efforts.

I did find the cached failure to be a bit annoying, but there is a simple hack to reset script editor without quitting: Change the machine name to something you know is junk... like "junk", recompile and let it fail then retype the real machine name. Not great but better than quitting every time...

Perhaps someone from Apple could chime in here...

Ken


On Jun 17, 2004, at 10:55 AM, Sander Tekelenburg wrote:

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.
_______________________________________________
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: Can't make remote AppleEvents work
  • Next by Date: Re: Name of Active Process
  • Previous by thread: Re: Can't make remote AppleEvents work
  • Next by thread: Name of Active Process
  • Index(es):
    • Date
    • Thread