Re: Can a script change its own name?
Re: Can a script change its own name?
- Subject: Re: Can a script change its own name?
- From: Bill Briggs <email@hidden>
- Date: Sun, 27 May 2001 10:08:47 -0300
At 2:07 PM +0200 27/05/01, Jan Pieter Kunst wrote:
I suspect that it is not possible to have the script change its own
name while it is running.
No, you can do it. Did you save it as an application, or try to run
it from the editor you are using? Here's some quick and dirty code
that works fine for me when saved as an application.
- web
property myName : "on"
tell application "Finder"
set x to path to me
if name of x is "on" then
set name of x to "off"
else if name of x is "off" then
set name of x to "on"
end if
end tell