• 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: How to access raw data (as seen in chevron syntax)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to access raw data (as seen in chevron syntax)


  • Subject: Re: How to access raw data (as seen in chevron syntax)
  • From: Shane Stanley <email@hidden>
  • Date: Fri, 02 Jul 2010 21:36:00 +1000
  • Thread-topic: How to access raw data (as seen in chevron syntax)

On 2/7/10 6:23 PM, "Emmanuel LEVY" <email@hidden> wrote:

> Use the normal write command... but specify "as string" otherwise
> you'll get a zero inserted between bytes, no?

Maybe you used to, but it causes an error in 10.6.

(I just went to do some testing and discovered that when I try to open a
PICT in Preview.app I get a message that the PICT file format is not
supported in 64-bit mode. So that talk of its being deprecated is true.)

Anyway, this seems to work OK in 10.6:

set x to the clipboard as picture -- get PICT data
set fileRef to (open for access file ((path to desktop as text) &
"Test.pict") with write permission)
set eof fileRef to 0
repeat 512 times
    write "a" to fileRef
end repeat
write x to fileRef starting at 513
close access fileRef

It doesn't matter what's written to the first 512 bytes, it seems.

--
Shane Stanley <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: How to access raw data (as seen in chevron syntax) (From: Emmanuel LEVY <email@hidden>)

  • Prev by Date: Re: Sort not case sensitive
  • Next by Date: Re: How to access raw data (as seen in chevron syntax)
  • Previous by thread: Re: How to access raw data (as seen in chevron syntax)
  • Next by thread: Re: How to access raw data (as seen in chevron syntax)
  • Index(es):
    • Date
    • Thread