• 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: get default browser?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: get default browser? (From: Michael Grant <email@hidden>)

  • Prev by Date: Geometry problems
  • Next by Date: Re: update images in Quark (recall)
  • Previous by thread: Re: get default browser?
  • Next by thread: Re: get default browser?
  • Index(es):
    • Date
    • Thread