Re: Keychain Scripting (Was Re: Keeping a volume Mounted)
Re: Keychain Scripting (Was Re: Keeping a volume Mounted)
- Subject: Re: Keychain Scripting (Was Re: Keeping a volume Mounted)
- From: Rob Jorgensen <email@hidden>
- Date: Sat, 10 Feb 2001 14:05:59 -0500
On 2/10/01, Sander Tekelenburg commented on "Re: Keychain Scripting
(Was Re: Keeping a volume Mounte":
At 09:41 -0500 UTC, on 10/02/2001, Rob Jorgensen wrote:
[...] I created a script to unlock my keychain. When run
from Script Debugger or Scripter, it works. When saved as an
application, it works. When saved as run-only (my feeble attempt to
hide the password anyway), it breaks with the following error:
Could not run the script "Unlock KC" because the script is not
editable (it was saved as run-only.). -1756
't works fine for me with both editable and run-only applets, as from Script
Editor. The only difference being that I'm doing this under OS 9.0.4 (with AS
1.4.3) and that I specify _which_ keychain:
tell application "Keychain Scripting"
unlock keychain "some keychain" with password "********"
quit
end tell
Then again, I don't see why specifying which keychain would work in an
editable applet but not in a run-only...
I tried it both ways...same result.
> The other result of running the run-only version is that the Keychain
Scripting app launches but is left running when the script fails.
You're telling an app to do something, and thus are launching it. (How else
can it do something?) You need to explicitly tell it to quit when it's done
(if you do want to quit it). I don't see why that would be different with
editable applets, run-only ones, or running it from Script Editor.
I had tried adding a quit command, but the behavior didn't change.
When running the script from within one of the editors, the quit
command was not needed. The only time the error occurs is when
double-clicking the run-only application to run it.
Sounds like either an OS 9.1 bug, or you're confused ;)
I'm absolutely sure that these are not mutually exclusive. :p
Thanks for your feedback.
Later,
Rob Jorgensen
Ohio, USA