• 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: Name of this folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Name of this folder


  • Subject: Re: Name of this folder
  • From: Nigel Garvey <email@hidden>
  • Date: Mon, 12 Mar 2001 01:09:37 +0000

Paul Berkowitz wrote on Sun, 11 Mar 2001 11:57:19 -0800:

>On 3/11/01 10:36 AM, "Bryan Harris" <email@hidden> wrote:
>
>>> Explanation:
>>>
>>> ":" as alias

>> This just returns "Applescript" for me. Does it only work when running
>from
>> other apps?
>>
>You must be running it from Script Editor. Sander was using it in an applet
>(script application), but didn't say so. This sort of thing happens quite a
>lot here.
>
>Similarly with Bill Briggs' 'path to me' solution. They both presuppose that
>the script in question is an application. If it is, then their solutions
>will work. I'm not sure that Robert, who first asked the question, realized
>that, nor did he say whether his script is
[...]

>1) A script application (applet/droplet) will return its container (folder)
>alias.
>
>2) A compiled script running from OSA menu behaves like an application in
>this and other regards: Leonard Rosenthol (who makes OSA menu) has made it
>so, which is very handy.

Actually, with OSA Menu, while 'path to me' returns the path to the
compiled script, '":" as alias' (or '"" as alias') returns the path to
the folder of the application to which OSA Menu has passed the script -
normally the application that was frontmost when the script was selected
from the menu - which can also be very handy. (I must try writing shorter
sentences.)

tell (a reference to Richard23)
text of "Hey, Artoo. What's this application's folder?" as string
end tell
display dialog (the alias result as string)

8-)

NG


  • Follow-Ups:
    • Re: Name of this folder
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Emailer script to file replies with replied-to messages
  • Next by Date: COMPARING TWO LISTS
  • Previous by thread: Re: Name of this folder
  • Next by thread: Re: Name of this folder
  • Index(es):
    • Date
    • Thread