Re: Inconsistent results from Finder and System Events
Re: Inconsistent results from Finder and System Events
- Subject: Re: Inconsistent results from Finder and System Events
- From: Richard Morton <email@hidden>
- Date: Wed, 19 Nov 2003 10:47:53 +1100
On Wednesday, November 19, 2003, at 07:49 AM, Christopher Nebel wrote:
What system version are you using? I get consistent answers in
Panther.
--Chris Nebel
AppleScript Engineering
On Nov 16, 2003, at 12:50 PM, Marc K. Myers wrote:
I tried getting the capacity and free space of a volume using System
Events. The results didn't seem to have anything to do with reality.
Then I did the same thing with Finder and got the results I >>
expected.
FWIW, I get similarly whacko results under 10.2.6 (System Events 1.1.2)
& found the same under 10.2. Finder is the correct one. It's the same
with all volumes. Some return a larger free space than capacity. All
are lower than the real figures.
tell application "System Events"
set x to {(capacity of disk "DasBoot") / (2 ^ 30), (free space of disk
"DasBoot") / (2 ^ 30)}
end tell
tell application "Finder"
set y to {(capacity of disk "DasBoot") / (2 ^ 30), (free space of disk
"DasBoot") / (2 ^ 30)}
end tell
{x:x, y:y}
--> {x:{3.99817276001, 3.01000213623}, y:{19.99817276001,
11.011920928955}}
Jacko
_______________________________________________
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.