• 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: running script get name of itself?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: running script get name of itself?


  • Subject: Re: running script get name of itself?
  • From: cris <email@hidden>
  • Date: Wed, 27 Dec 2000 00:16:34 +0100

on 26.12.2000 23:00 Uhr, Bill Tandy at email@hidden wrote:

> How can a running script get the name of itself as text (set myName to
> ...)?

-- without Finder:
name of (info for (path to me))

-- or:
set tempString to (path to me) as string
repeat while tempString contains ":"
set theOffset to (offset of ":" in tempString) + 1
set tempString to (characters theOffset thru -1 of tempString) as
string
end repeat
tempString

-- with Finder:
(name of file (path to me)) of application "Finder"

-- or:
tell application "Finder" to set AppName to name of application file
(path to current application)


Watch for linebreaks.



Greetings
cris :-)
--
English is my second language.
www.cooc.de


References: 
 >running script get name of itself? (From: Bill Tandy <email@hidden>)

  • Prev by Date: Re: applescript-users digest, Vol 2 #164 - 18 msgs
  • Next by Date: Re: running script get name of itself?
  • Previous by thread: Re: running script get name of itself?
  • Next by thread: Re: running script get name of itself?
  • Index(es):
    • Date
    • Thread