Re: get program name on start
Re: get program name on start
- Subject: Re: get program name on start
- From: Stan Cleveland <email@hidden>
- Date: Wed, 02 Sep 2009 14:54:14 -0700
- Thread-topic: get program name on start
On 9/2/09 1:19 AM, "Tobias Exner" wrote:
> I'm thinking about to create multiple applescripts. Because there will
> be a small difference in the code between them I want to create only one
> program and control the behaviour using the name of the program.
>
> My question: Is there a way to get the own name of the program on start?
Tobias, the following may help you:
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 code works when run within a script application, but won't work when
the script is run from Script Editor, which will affect how you do testing.
Stan C.
_______________________________________________
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