Re: Filespec changes to "followed" alias
Re: Filespec changes to "followed" alias
- Subject: Re: Filespec changes to "followed" alias
- From: "Marc K. Myers" <email@hidden>
- Date: Wed, 15 May 2002 14:25:05 -0400
- Organization: [very little]
>
Date: Wed, 15 May 2002 08:25:16 -0600
>
Subject: Filespec changes to "followed" alias
>
From: Gnarlodious <email@hidden>
>
To: "AppleScript (Gnarlodious)" <email@hidden>
>
>
-----: Rachel
>
Content-type: text/plain; charset="US-ASCII"
>
Content-transfer-encoding: 7bit
>
>
I have this line(running 9.2.2):
>
>
tell application "Finder" to delete alias "Apple:Desktop
>
Folder:Hotlist.html"
>
>
Problem is, I can't even compile the script because the file does not (yet)
>
exist and Script Debugger reports as such and can't compile.
>
How to fix this?
>
>
Also, after the file is moved the script magically changes so the filespec
>
is the trashed file. When I run the script next it errors because there is
>
no trash file.
Alias references have to point to existing files and will continue to
point to that file even if you move it or change its name. Alias
references internally point to an invisable unique file identifier, not
to names or locations. What you need is a file reference:
tell application "Finder" to delete file "Apple:Desktop Folder:Hotlist.html"
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[5/15/02 2:22:38 PM]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.