Name of Application

Hi all, I can get the name of my application with the following:

set myname to name of me
	display dialog myname

However, it appears that this is the name of the Xcode target, not the actual name of the application on the file system. Is there another way to get the application name with the .app extension?

Try this:

name of (info for (path to me))

I don’t know what you mean by the name of the xcode target, but see if it works.

gl,

Darn, another person who wants but don’t give.

Unless you’ve changed the display name somehow, you should be able to just add on the .app extension yourself.

Maybe you should tell us what you’re trying to do with this information.

Perhaps you’re looking for something like this:

set ASTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {":"}
set appFilename to text item -2 of (path to me as Unicode text)
set AppleScript's text item delimiters to ASTID

display dialog appFilename

It worked perfectly. Sorry if I seemed rude by not thanking you sooner.

Dean

Kel gave me the exact answer I needed. The idea it stop people from being able to change the display name of the app.