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: "Marc K. Myers" <email@hidden>
- Date: Tue, 18 Nov 2003 16:23:56 -0500
Kai -
OMM both System Events and Finder appear to return reals for capacity
and free space of disks. Or am I missing something? I'm running OS X
10.2.8 on a 466MHz G4 box with AppleScript 1.9.
tell application "Finder"
set {x, y} to {capacity of disk "New Guy", free space of disk "New
Guy"}
log {x, x / (2 ^ 30), class of x, y, y / (2 ^ 30), class of y}
end tell
--(*4.00226304E+10, 37.273979187012, real, 2.9217615872E+10,
27.211025238037,
tell application "System Events"
set {x, y} to {capacity of disk "New Guy", free space of disk "New
Guy"}
log {x, x / (2 ^ 30), class of x, y, y / (2 ^ 30), class of y}
end tell
--(*1.367924736E+9, 1.273979187012, real, 3.44700928E+9,
3.210277557373, real*)
Marc [11/18/03 4:22:40 PM]
Date: Tue, 18 Nov 2003 02:26:50 +0000
Subject: Re: Inconsistent results from Finder and System Events
From: kai <email@hidden>
To: <email@hidden>
on Sun, 16 Nov 2003 15:50:40 -0500, "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.
What is System Events really reporting?
tell application "Finder"
log {(capacity of disk "New Guy") / (2 ^ 30), (free space of disk
"New
Guy") / (2 ^ 30)}
end tell
--(*37.273979187012, 27.372215270996*)
tell application "System Events"
log {(capacity of disk "New Guy") / (2 ^ 30), (free space of disk
"New
Guy") / (2 ^ 30)}
end tell
--(*1.273979187012, 3.372055053711*)
Looks like you haven't had a nibble on this one yet, Marc - so I'll
try and
kick things off - by observing that the Finder returns the value of
'capacity' as a double integer, while System Events returns an unsigned
integer...
Now where are the mathematicians around here? ;-)
_______________________________________________
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.