• 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: Routines for review: Hex <-> String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Routines for review: Hex <-> String


  • Subject: Re: Routines for review: Hex <-> String
  • From: julifos <email@hidden>
  • Date: Mon, 20 Jan 2003 09:23:23 +0100

> Anyone know if string<->integer and integer<->hex conversions can be
> done in a similar way? (Given that the result of conversion to
> integers would probably have to be in form of a string containing one
> integer per line, rather than as a list of true integer values, to be
> practical.)

If (string <-> integer) = (ASCII <-> decimal) then

ASCIItoDecimal("B")
DecimaltoASCII(result)

else if (you want manipulate unicode stuff) then
repeat while AppleScript doesn't operate with unicode stuff

useStringToHex2bytes_then_Hex2bytesToDec(unicode_text)

end repeat
end if

on ASCIItoDecimal(t)
return ASCII number t
end ASCIItoDecimal
on DecimaltoASCII(i)
return ASCII character i
end DecimaltoASCII

JJ
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
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.

  • Prev by Date: triggering applescript over the web?
  • Next by Date: Re: Routines for review: Hex <-> String
  • Previous by thread: Re: Routines for review: Hex <-> String
  • Next by thread: Perplexed, or Re: Why does the Script Editor Service do...
  • Index(es):
    • Date
    • Thread