• 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: Paul Berkowitz <email@hidden>
  • Date: Sun, 27 May 2001 09:37:46 -0700

On 5/27/01 6:39 AM, "Jan Pieter Kunst" <email@hidden> wrote:

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


'path to me' IS the name of a file. When you don't specify 'as string' then
it means 'as alias', and the result is an AppleScript alias (a file which is
identifiable even if it is moved from its present location), as in

alias "My Hard Disk:System Folder:Apple Menu Items:Turn Flash On"

You can save it in a property and even move the applet somewhere else, and
it will still be found. An AppleScript 'alias' does not have a 'name'
property, but this line is in a Finder tell block in Bill's script. The
Finder understands AppleScript aliases and translates it into its own 'file'
object. If you run that script to that point and look in the Event Log, it
will look like

file "Turn Flash On" of folder "Apple Menu Items" of folder "System
Folder" of disk "My Hard Disk" of application "Finder"

So it _is_ a file which does have a name property in the Finder, namely
"Turn Flash On", which can be changed to "Turn Flash Off".


--
Paul Berkowitz


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

  • Prev by Date: choosing a specific file on desktop
  • Next by Date: Re: Can a script change its own name?
  • 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