Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Re: Another AppleScript question

Skip to first unread message


Feb 23, 2015, 12:32:22 PM2/23/15
[crossposted and follow-ups set to <news:alt.comp.lang.applescript>]

In article
Mike Cook <> wrote:

> I have created a script and saved it as an Application. When I click the Run
> button from within the Script Editor, it executes as expected, no errors.
> But if I double-click on the application file I just created I get the
> notice:
> "The command exited with a non-zero status," and the script doesn't give
> the result that it should.

Sounds like you're using "do shell script". Make sure to read
Likely culprits are with handling of stdout and stderr, (relative)
paths, privileges and such.

> I would expect this to run just like it did from within the editor.
> Why does this script not run?

Depending in part on your OS version, Script Editor may be another
context than the one your applet runs in.[*] That context in turn might
be relevant in yet other ways to "do shell script" itself.

[*] In AS, "me" refers to the script itself. But when run inside Script
Editor, it refers to Script Editor. That is, it used to. Apple changed
that somewhat recently, but I don't recall in when exactly.

"-- \n"
0 new messages