• 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
(no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(no subject)


  • Subject: (no subject)
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 9 Dec 2005 16:23:38 -0600

David A. Cox asked ...
The problem is that when I run the program on a client machine, it
requests info on where QuickTime Broadcaster and Audio Hijack Pro are if
they are not installed, even if they are not selected as the apps that
will be  doing the recording. I assume this is so that the application can
understand the dictionary terms for the applicaitons. I do not want  to
have to develop 3 versions  of the applicaiton (one for each of the
recording options) and so I am contacting you.

On first reading this, my reaction was "Oops! I didn't think of that last week when I wrote a script that referenced applications that the user may not have." So I copied the script to another computer not having one of the applications and ran it. It worked perfectly and did not ask for the missing application. (I have this script that works perfectly. Does anyone have any suggestions for screwing it up?)

After taking a look at my script, I see why it works correctly -- Handlers containing a reference to a missing application are not called. Here's a snippet:

    short name of (info for (path to frontmost application))
    try
        if the result is "Smile" then
            set docAlias to my getDocFromSmile()
        else if the result is "Script Editor" then
            set docAlias to my getDocFromScriptEditor()
        else if the result is "Finder" then
            set docAlias to my getDocFromFinder()
        else
            return
        end if
    on error
        return
    end try

Since your applications aren't running when your script is launched, you can't use this. You might want your script to begin with a 'choose application', allowing the user to specify the application first, then call the appropriate handler.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: (no subject)
      • From: "David A. Cox" <email@hidden>
  • Prev by Date: [OT] You have been unsubscribed from the SUL mailing list
  • Next by Date: Re: (no subject)
  • Previous by thread: Re: filemakerpro, go to the next record
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread