Re: How do I format a number or Round a number?
Re: How do I format a number or Round a number?
- Subject: Re: How do I format a number or Round a number?
- From: kai <email@hidden>
- Date: Sun, 12 Oct 2003 15:43:11 +0100
on Sun, 12 Oct 2003 14:06:46 +0100, Nigel Garvey wrote:
>
John Cochrane wrote on Sun, 12 Oct 2003 14:24:59 +1000:
[snip]
>
> However I find that they both have problems if used to get the size of a
>
> folder. The first time that the scripts are run they return a missing value.
>
> If repeated they return a result...
[snip]
Interestingly, the Finder in OS 9 appears to wait until it has calculated a
useful value before replying...
>
I can duplicate the 'missing value' effect in Mac OS X immediately after
>
logging in. Forcing the Finder to 'update' the folder before getting its
>
size seems to do the trick.
[snip]
>
set theFolder to (choose folder)
>
tell application "Finder"
>
update theFolder with necessity
>
repeat
>
set {_physicalSize, _size} to theFolder's {physical size, size}
>
if the result does not contain missing value then exit repeat
>
end
>
end tell
Since 'update' alone doesn't do it, Nigel - and the checking loop seems to
work here without 'update', I suspect that's where the solution really lies.
---
kai
_______________________________________________
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.