Re: Hex > Text
Re: Hex > Text
- Subject: Re: Hex > Text
- From: Joshua See <email@hidden>
- Date: Wed, 17 Sep 2003 08:50:24 -0500
On Tuesday, Sep 16, 2003, at 18:21 US/Central, Rob Jorgensen wrote:
I have, in hex, a "drag" resource from a clipping file. Is it possible
to convert the hex to text via the shell or vanilla AppleScript? If
so, sample code would be greatly appreciated as my search has yielded
nothing useful.
You can get a resource into the data fork with the shell, and the use
the file commands from the Standard Additions to read and manipulate it.
do shell script "cp foo.textClipping/rsrc | foo.rsrc"
I usually don't try to return the resource fork through the shell
script command because the results can be unpredictable when dealing
with binary data.
Also, if you are willing to require user to have the developer tools,
see the manual pages regarding DeRez.
If still want to use hex, Apple has some routines for URL encoding you
could modify to suit your needs at
<
http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.10.htm> .
There are also hex chewing OSAX out there.
Sincerely,
Joshua See
_______________________________________________
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: | |
| >Hex > Text (From: Rob Jorgensen <email@hidden>) |