• 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 11:09:39 -0300

At 3:39 PM +0200 27/05/01, Jan Pieter Kunst wrote:
Indeed, that works. I experimented with "me" in the Script Editor first, but
I noticed that it seemed to refer to the Script Editor application instead
of the script. I didn't realize that the referent of "me" would probably
change if the script was saved as an application.

Yes, "me" becomes the script application itself when you save it and run it that way. Running such a script in Script Editor while it's open is destined to error.



I also didn't realize that I had to use the name of a path instead of the
name of a file.

By using "path to me" the thing will always find itself no matter where you move it. Storing the name in a property means your script remembers in which direction it toggled things last.

- web


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

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