Re: Bytes into integer
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.