• 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
Re: Load Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load Script


  • Subject: Re: Load Script
  • From: Nigel Garvey <email@hidden>
  • Date: Sat, 28 May 2011 21:04:11 +0100

Hi, Axel and Luther.

I haven't been following the thread very closely, but I've just noticed this:

>		(((path to me) as text) & "Contents:Resources:MenuItemScripts:" & AppName
>& ".scpt") as alias

A bit of geekery if you're interested.

(path to me as text) is more efficient than ((path to me) as text). In
the first case, the text is returned directly by 'path to', 'as' being a
'path to' parameter. In the second, 'path to' returns an alias, which is
then coerced to text by AppleScript.

Even better for your purposes may be:

  path to resource (AppName & ".scpt")

or:

  path to resource (AppName & ".scpt") in directory "MenuItemScripts"


NG

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Load Script
      • From: Axel Luttgens <email@hidden>
    • Re: Load Script
      • From: Cameron Knowlton <email@hidden>
  • Prev by Date: Re[2]: Convert an image to a PDF
  • Next by Date: Re: Load Script
  • Previous by thread: Re: Load Script
  • Next by thread: Re: Load Script
  • Index(es):
    • Date
    • Thread