Re: Help read from resource fork
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