Replacing Codes with Text
Replacing Codes with Text
- Subject: Replacing Codes with Text
- From: email@hidden
- Date: Fri, 15 Jun 2001 09:40:19 -0500
I have a list of codes that are abbreviations for full names of Sunday
comics. At a point in my script, I need to replace the codes in that list
with the full comic name. I have been unable to come up with an idea of how
to approach this.
The actual list would normally contain 15-20 codes out of a 175 different
possibilities. Here is a short sample of the list I am dealing with.
List 1
{"agn", "bal", "bmp", "bof"}
I need to replace those items with:
{"Agnes", "Baldo", "Speed Bump", "Mister Boffo"}
I want to do it as a repeat loop, and treat each item separately, as I
actually have to do a few other things with each code at this point of the
script.
Is there any way I could set up a text file with all 175 codes and what they
equal, along the lines of:
agn = Agnes
bal = Baldo
bmp = Speed Bump
bof = Mister Boffo
then have the script call it in as a variable and compare one list to the
other and build a new list?
I am open to any ideas at all, and will use other osax if it will make it
easier.
Jim Scharosch
Mac System Administrator
Gazette Communications
319-368-8669
email@hidden