• 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: Hex > Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Hex > Text
      • From: Rob Jorgensen <email@hidden>
References: 
 >Hex > Text (From: Rob Jorgensen <email@hidden>)

  • Prev by Date: Re: Click and Drag using UI scripting?
  • Next by Date: Re: Click and Drag using UI scripting?
  • Previous by thread: AS in AppleExpo Paris.
  • Next by thread: Re: Hex > Text
  • Index(es):
    • Date
    • Thread