Name of current application as text?

Any idea how I could get the name of the running application as a text string?

I tried “set ThisApp to me as text” but that doesnt work

What application are you trying to get the name of? The applescript app?

Yes, the AppleScript app. Ii need to get it’s name so other users can run it under different app names. But I need the name of it in my script

name of (info for (path to frontmost application))

Thank you once again Stefan!

Hi.

That returns the name of the frontmost application, which may or may not be the current one. If I’ve understood Stadsman correctly, he needs:

name of (info for (path to current application))

Or:

name of (info for (path to me))

‘path to current application’ and ‘path to me’ are officially equivalent, but the meaning of ‘path to me’ has been changed for compiled scripts running in Script Menu. There, it means the path to the compiled script file, not to the application running it (which is System Events). But with script applets, ‘path to me’ and ‘path to current application’ are still the same.

You could be right, Nigel :wink:

Stefan’s worked perfect already but I will change it to the more generic one to be sure