Re: Why doesn't this simple script work?
Re: Why doesn't this simple script work?
- Subject: Re: Why doesn't this simple script work?
- From: Mr Tea <email@hidden>
- Date: Wed, 08 Aug 2001 18:54:30 +0100
This from email@hidden - dateline 8/8/01 5.49 pm:
>
--> Can't get folder of {name:"IP09.15N.1ST.EPSF", creation date:date
>
"Wednesday, August 8, 2001 3:47:47 pm", modification date:date "Wednesday,
>
August 8, 2001 3:47:49 pm", icon position:{-1, -1}, visible:true,
>
size:5.78659E+5, folder:false, alias:false, locked:false, busy
>
status:false, file creator:"XPR3", file type:"EPSF", short version:"", long
>
version:""}.
>
>
>
...which doesn't make sense because it's right there- folder:false. Can
>
anyone shed some light on this for me?
This fails to work because 'info for' is not a Finder command, and the
Finder gets confused about the use of the term here.
Probably the simplest way to get around this is to replace your line...
if folder of the item_info is true then
with this line...
if item 7 of (item_info as list) is true then
There doesn't seem to be a problem with getting the alias or file type
however, so the rest of your script should run as planned.
I notice that the size of your EPS file, as reported by 'info for' looks
like something on the display of a calculator that's had too many sums put
into it. I got the same type of thing with the file (a 138k pict) that I
tested the above solution on - its size was reported as 1.07766E+5. Perhaps
some more knowledgeable soul could explain what the hell that means.
And incidentally, Steve, it would be really good if you could avoid sending
those absurd confidentiality clauses that the Independent tags on to your
emails, although I appreciate that this may be tricky when contacting the
list from your work address.
Mr Tea
--
Brew of the day: Breakfast Blend
Visit the Tea Room at:
http://homepage.mac.com/mrtea/tearoom.html