Running from what?
Running from what?
- Subject: Running from what?
- From: Dave Saunders <email@hidden>
- Date: Fri, 24 Nov 2000 19:03:14 -0500
Is there a way to detect from where a script is being run? I'm creating a
suite of scripts that I intend be driven by a set of OneClick buttons, but
I'm also making them available from the OSA menu (and, during testing, I run
them with Script Debugger).
Because of problems with OneClick not always being able to recover when an
AppleScript craps out with an error, I'm trying to make sure that never
happens by passing error messages back to the OneClick button to display
(rather than use Display Dialog in the error handler). But that won't work
if run from the OSA menu.
Even as I type, it occurs to me that I could use a property. Let the
OneClick button set the property with the call (can it do that? I'll have to
go read some manuals) and so if it's not set the call must have come from
the OSA menu and so I could use Display Dialog rather than pass back a
result.
Has anyone attempted anything like this?
Dave