Can a script change its own name?
Can a script change its own name?
- Subject: Can a script change its own name?
- From: Jan Pieter Kunst <email@hidden>
- Date: Sun, 27 May 2001 14:07:14 +0200
Greetings all,
I wrote a little script to toggle Flash on/off in Internet Explorer. It
works by moving the plugins to and from a "Plugins (disabled)" folder.
It is called "Turn Flash on/off" and resides as an applet in my Apple menu.
What I would like to do is have the script rename itself to "Turn Flash off"
after it turn Flash on, and vice versa. However, I get an error when I try
to tell the Finder to do this. I suspect that it is not possible to have the
script change its own name while it is running.
Assuming that this is right, would it then perhaps be possible to have
another script do this? I.e, a setup where script A calls script B to rename
script A? Or am I on the wrong track completely?
Thanks in advance for any advice,
Jan Pieter Kunst.-