MACSCRPT Archives

May 2003

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Delacour <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 6 May 2003 14:10:00 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
At 8:22 am -0400 6/5/03, Mark Lively wrote:

>  Finders dictionary in OS X (10.2.5) says I can say
>
>  tell application "Finder"
>         get label index of file (choose file)
>  end tell
>
>  and it should work.

No it shouldn't.  'choose file' returns an alias and 'file alias "x"'
is bound to return an error.

'label index' is a property of 'item'

So this is the syntax you'd need, but not the label index is not
listed as a porperty.

tell application "Finder"
   properties of item ("" & (choose file))
end tell

{class:document file, name:"b.txt", index:5, displayed name:"b.txt",
name extension:"txt", extension hidden:false, container:folder
"Documents" of folder "jd" of folder "Users" of startup disk of
application "Finder", disk:startup disk of application "Finder",
position:{-1, -1}, bounds:{-33, -33, 31, 31},
kind:"NSStringPboardType", locked:false, description:missing value,
comment:"", size:13.0, physical size:4096.0, creation date:date
"Wednesday, November 6, 2002 1:04:08 pm", modification date:date
"Friday, April 18, 2003 9:08:19 am", icon:missing value,
URL:"file://localhost/Users/jd/Documents/b.txt", owner:"jd",
group:"staff", owner privileges:read write, group privileges:read
only, everyones privileges:read only, file type:"TEXT", creator
type:"ttxt", stationery:false, product version:"", version:""}

>    OSX keeps track of the information.

??

>    I just want to get at it and well change it.  Any ideas?

Unless I'm much mistaken 'label index' is not implemented, in spite
of the lying dictionary.  You can neither get it not set it.

JD

ATOM RSS1 RSS2