• 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: Help read from resource fork
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help read from resource fork


  • Subject: Re: Help read from resource fork
  • From: Emmanuel <email@hidden>
  • Date: Sat, 2 Dec 2000 15:53:59 +0100

At 14:59 +0100 1/12/00, Serge Belleudy-d'Espinose wrote:
>Hi,

Salut !

>I'm trying to use Akua to edit some resources in a file.
>'the resource of type "blob"' returns <<data blobNNNN...>>, but then I
>need to coerce that to a string. I've tried adding 'as string' but it
>either crashes Script Editor or returns an unusable string. Nothing else -
>as resource string for example - is useful.
>
>Any idea someone?

If the resource is not too long (the upper limit is approximately 224
bytes, I think) you could cast it to Pascal string, then to string.

I did not try this with Akua, but it works with the Satimage osax.

Note that you will miss the first two bytes.

--------------------- untested pseudo-code
(LoadResource 128 type "WXYZ" from theFile as Pascal string) as string
---------------------

>PS.: don't tell me about shareware stuff, I absolutely need freeware...

I think the Satimage osax is free.

HTH
Emmanuel


References: 
 >Help read from resource fork (From: "Serge Belleudy-d'Espinose" <email@hidden>)

  • Prev by Date: Re: Month as Integer (or he's ranting again)
  • Next by Date: Re: Month as Integer
  • Previous by thread: Help read from resource fork
  • Next by thread: RE: Quark Scripting
  • Index(es):
    • Date
    • Thread