MACSCRPT Archives

September 2009

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:
Emmett Gray <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Thu, 3 Sep 2009 23:35:50 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (23 lines)
This used to work in Leo, no more in Snow (infinite loop):
set mySize to "missing value"
repeat while mySize is "missing value"
    tell application "Finder" to set mySize to (size of alias myFolder)
end repeat

(the repeat loop was necessary because just asking once returns 
"missing value" but looping produces a number).

In Snow Leopard I now must use
set mySize to "missing value"
repeat while mySize is "missing value"
    set sourceSize to (size of (info for (POSIX path of myFolder)))
end repeat

This does the job, but the Scripting Additions dictionary says that 
"info for" is deprecated, and one should tell System Events to get 
this record. But when I tried that, I could never get it to produce 
anything but "missing value", with the loop inside of or outside the 
tell block, so I'm stuck using the deprecated call.

Does anyone have any insight in this (with only vanilla osaxen)? TIA.

ATOM RSS1 RSS2