Re: get program name on start
Re: get program name on start
- Subject: Re: get program name on start
- From: Michelle Steiner <email@hidden>
- Date: Wed, 2 Sep 2009 16:12:58 -0700
On Sep 2, 2009, at 2:54 PM, Stan Cleveland wrote: set scriptLocation to (path to me) as string --> "Macintosh HD:Users:stanc:Desktop:TestScript.scpt"
You can parse the script name from the path string.
This works:
tell application "System Events" to get name of (path to me) -- you can also use Finder instead of System Events, but I understand that it's better to use System Events instead of Finder wherever possible.
It returns the name of a saved script (either as a compiled script or as an application); if the script has not been saved, though, it returns the name of the editor.
-- Michelle -- Your right to free speech does not incur an obligation for anyone to listen.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden