• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can a script change its own name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Can a script change its own name?
      • From: Jan Pieter Kunst <email@hidden>
References: 
 >Can a script change its own name? (From: Jan Pieter Kunst <email@hidden>)

  • Prev by Date: Can a script change its own name?
  • Next by Date: Re: Can a script change its own name?
  • Previous by thread: Can a script change its own name?
  • Next by thread: Re: Can a script change its own name?
  • Index(es):
    • Date
    • Thread