• 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: Bytes into integer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bytes into integer


  • Subject: Re: Bytes into integer
  • From: Walter Ian Kaye <email@hidden>
  • Date: Fri, 13 Feb 2004 11:54:03 -0800

At 11:10a -0500 02/13/2004, Steve Roy didst inscribe upon an electronic papyrus:

Steve Roy <email@hidden> wrote:

set b1 to read theFileRef for 1
set b2 to read theFileRef for 1
set b3 to read theFileRef for 1
set off to ((ASCII number b1) * 65536) + (ASCII number b2) * 256 + (ASCII number
b3)

Will you be doing this multiple times, or just once?

I notice it's 6 osax calls. Might be faster if you were to read 3 bytes at once, prepend a null character, write it to a temp file, and read it back as integer.
That'd be just 3 calls (assuming you've stored the 0x00 as a property).


-boo
_______________________________________________
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.

References: 
 >Re: Bytes into integer (From: Steve Roy <email@hidden>)

  • Prev by Date: Re: Looking for Specific Bytes in a File
  • Next by Date: Re: Looking for Specific Bytes in a File
  • Previous by thread: Re: Bytes into integer
  • Next by thread: Select focus for GUI script
  • Index(es):
    • Date
    • Thread