home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 17 / MacFormat 17 (Spain) / MacFormat 17.bin / DATABASE / SHARED.DIR / 01018_0.ls < prev    next >
Encoding:
Text File  |  1996-03-14  |  3.7 KB  |  136 lines

  1. on fixnames7 start, end
  2.   set lastname to EMPTY
  3.   set Error to EMPTY
  4.   repeat with i = start to end
  5.     set tmpname to string(the name of cast i)
  6.     if word 2 of tmpname = "head" then
  7.       set name to word 1 of tmpname
  8.       if name <> lastname then
  9.         set tmpnum to Bsearch(name, "MakerList")
  10.       end if
  11.       if tmpnum > 0 then
  12.         put "0ld " && tmpname
  13.         set tmpname to item 2 of line value(tmpnum) of field "MakerList" & "-head"
  14.         set the name of cast i to tmpname
  15.         put "new" && tmpname
  16.       else
  17.         put "error " && tmpname
  18.         put "error" && tmpname & RETURN after Error
  19.       end if
  20.     else
  21.       if 1 = 1 then
  22.         put "0ld " && tmpname
  23.         set the itemDelimiter to "-"
  24.         set name to item 2 of tmpname
  25.         set the itemDelimiter to ","
  26.         if lastname <> name then
  27.           set tmpnum to Bsearch(name, "MakerList")
  28.         end if
  29.         if tmpnum = "0" then
  30.           put "error" && tmpname
  31.           put "error" && tmpname & RETURN after Error
  32.         else
  33.           set the itemDelimiter to "-"
  34.           set tmpname to item 1 of tmpname
  35.           set the itemDelimiter to ","
  36.           set tmpname to item 2 of line value(tmpnum) of field "MakerList" & "-" & tmpname
  37.         end if
  38.         set the name of cast i to tmpname
  39.         put "new" && tmpname
  40.       end if
  41.     end if
  42.     set lastname to name
  43.   end repeat
  44.   put Error
  45. end
  46.  
  47. on fixnames3 start, end
  48.   repeat with i = start to end
  49.     set tmpname to string(the name of cast i)
  50.     put "0ld " && tmpname
  51.     set tmpname to tmpname && "name"
  52.     set the name of cast i to tmpname
  53.     put "new" && tmpname
  54.   end repeat
  55. end
  56.  
  57. on fixnames8 start, end
  58.   repeat with i = start to end
  59.     set tmpname to string(word 1 of the name of cast i)
  60.     put "0ld " && tmpname
  61.     set tmpname to word 1 of tmpname
  62.     set tmp to NameToNum(tmpname)
  63.     if (tmp = 1) and (tmpname <> "Ali") then
  64.       put "error " & tmpname
  65.       next repeat
  66.     end if
  67.     set tmpname to tmp & ".name2"
  68.     set the name of cast i to tmpname
  69.     put "new" && tmpname
  70.   end repeat
  71. end
  72.  
  73. on fixnames5 start, end
  74.   repeat with i = start to end
  75.     set tmpname to string(the name of cast i)
  76.     if not (tmpname contains "(") then
  77.       next repeat
  78.       next repeat
  79.     end if
  80.     put "0ld " && tmpname
  81.     set the itemDelimiter to "("
  82.     set newname to item 2 of tmpname
  83.     set the itemDelimiter to ")"
  84.     set newname to item 1 of newname
  85.     set the itemDelimiter to "-"
  86.     set tmpname to item 1 of tmpname & "-" & newname
  87.     set the name of cast i to tmpname
  88.     put "new" && tmpname
  89.   end repeat
  90. end
  91.  
  92. on fixnames start, end
  93.   repeat with i = start to end
  94.     set tmpname to string(the name of cast i)
  95.     put "0ld " && tmpname
  96.     set the itemDelimiter to "-"
  97.     set tmpname to item 1 to 2 of tmpname
  98.     set the itemDelimiter to ","
  99.     set the name of cast i to tmpname
  100.     put "new" && tmpname
  101.   end repeat
  102. end
  103.  
  104. on fixnames2 start, end
  105.   repeat with i = start to end
  106.     set tmpname to string(the name of cast i)
  107.     if char the number of chars in tmpname of tmpname = " " then
  108.       put "0ld " && tmpname
  109.       delete char the number of chars in tmpname of tmpname
  110.       put "new" && tmpname
  111.     end if
  112.     set the name of cast i to tmpname
  113.   end repeat
  114. end
  115.  
  116. on fixnames4 start, end
  117.   repeat with i = start to end
  118.     set tmpname to string(the name of cast i)
  119.     if word 1 of tmpname = "head" then
  120.       delete word 1 of tmpname
  121.       set tmpname to tmpname && "head"
  122.       put "new " && tmpname
  123.     end if
  124.   end repeat
  125. end
  126.  
  127. on fixnames6 start, end
  128.   set count to 1
  129.   repeat with i = start to end
  130.     set tmpname to "rolette" & count
  131.     set the name of cast i to tmpname
  132.     put "new" && tmpname
  133.     set count to count + 1
  134.   end repeat
  135. end
  136.