Re: get default browser?
Re: get default browser?
- Subject: Re: get default browser?
- From: JollyRoger <email@hidden>
- Date: Fri, 02 Aug 2002 08:06:16 -0500
On 8/1/2002 3:53 PM, "Michael Grant" <email@hidden> wrote:
>
On 8/1/02 3:34 PM, "Reinhold Penner" <email@hidden> wrote:
>
>
> Not so quick ;-) The above is HEX and translates to "OWEB OmniWeb" in
>
> ASCII. So if you want to replace that, you could write "4348494D
>
> 074E6176 69676174 6F720000 00000000 00000000 00000000 00000000 00000000
>
> 00000000 00000000 00000000 00000000 00000000 00000000 00000000
>
> 00000000", which would be "CHIM Navigator".
>
>
OK, now we're getting somewhere. Any pointers on translating hex to ascii in
>
AppleScript?
What you have to do is loop through each two-digit hex code in the string
using a repeat loop and convert it to its ASCII equivalent.
A simple way is to build an array holding each two-digit hex code up to FF:
0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 etc (Hex)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 etc (Decimal)
Then look up each two-digit hex code in the Hex array to get its
index/position/decimal value, and convert that value to ASCII using Standard
Additions.
Hex Decimal ASCII
-------------------------
43 67 C
48 72 H
49 73 I
4D 77 M
...etc
I'm sure this has been done before in plain AppleScript (no scripting
additions); but am not able to find an example at the moment.
JR
_______________________________________________
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.