Translate a code of 2 characters to a text
Translate a code of 2 characters to a text
- Subject: Translate a code of 2 characters to a text
- From: Olivier Berquin <email@hidden>
- Date: Tue, 07 May 2002 09:29:04 +0200
Hi all,
I will receive a database wich contains about 9 fields. In one of these
fields, I have a 'code', like this:
CD, DVD, VHS, ...
I have about 80 'codes'. I must 'translate' this code in text like this:
CD = COMPACT DISC,
DVD = DIGITAL VERSATILE DISC
...
How can I 'translate' this code.
I wrote this (with 6 codes):
--
property ListOfMedia : {{"CD", "COMPACT DISC"}, ,
{"SA", "SUPER AUDIO"}, ,
{"MD", "MINI DISC"}, ,
{"MC", "MUSICASSETTE"}, ,
{"VH", "VIDEO"},,
{"DV", "DIGITAL VERSATILE DISC"}}
repeat with TheCounter from 1 to 6
if TheTypeOfMedia = item 1 of item TheCounter of ListOfMedia then
set TheTypeOfMedia to item 2 of item TheCounter of ListOfMedia
exit repeat
end if
end repeat
--
Is this the better way, and the fastest way ?
TIA
Olivier.
_______________________________________________
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.