• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem with reading 4-byte floats from file on Intel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Re: Problem with reading 4-byte floats from file on Intel (From: email@hidden)
 >Re: Problem with reading 4-byte floats from file on Intel (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Smile (Was: AppleScript4programmers)
  • Next by Date: Re: Problem with reading 4-byte floats from file on Intel
  • Previous by thread: Re: Problem with reading 4-byte floats from file on Intel
  • Next by thread: Re: Problem with reading 4-byte floats from file on Intel
  • Index(es):
    • Date
    • Thread