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?
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