Re: Problem with reading 4-byte floats from file on Intel
Re: Problem with reading 4-byte floats from file on Intel
- Subject: Re: Problem with reading 4-byte floats from file on Intel
- From: email@hidden
- Date: Thu, 06 Dec 2007 13:56:19 -0500
Hi Emmanuel,
You are correct, if one installs the (3rd party product) Satimage.osax,
you can read binary files as little endian. I'd also have to check the
machine architecture and decide whether to read as big endian or little
endian. Even Satimage does not appear to have an option to read as
"native-endian" (no conversion).
However, I am trying to run this script from inside an installer for my
product. I don't want to install Satimage.osax into the systems's or
user's Scripting Additions folder as part of my product, and the
documentation for Satimage does not indicate if there is a way to use
Satimage without doing that.
Satimage does look like a really nice and useful piece of work, though.
Finally, I also had another problem with the "read" command, documented
earlier in this thread, when trying to read a number (512) of small real
objects in one AppleScript line. It worked fine on my G5, but not on my
Intel, failing without any error or warning. Solution there was to
reduce the number of objects, but how far? This might be machine
dependent, and no response has said otherwise.
Anyway, the C program I wrote has none of these limitations.
- Rick
On 12/6/2007 1:06 PM, Emmanuel wrote:
At 10:55 AM -0500 12/6/07, email@hidden wrote:
I just wish that there was an easy way in AppleScript to read 4-byte
floats from a binary file written on an Intel Mac in Intel's own endian!
Apparently not.
If I understand correctly, installing and using Satimage.osax is a
solution. Considering that installing an osax is easy, the answer is in
fact yes.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden