• 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
Running from what?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Running from what?
      • From: "Christopher C. Stone" <email@hidden>
    • Re: Running from what?
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Smile dialogs
  • Next by Date: Re: Running from what?
  • Previous by thread: Re: Scripting more than one version of an app?
  • Next by thread: Re: Running from what?
  • Index(es):
    • Date
    • Thread