home *** CD-ROM | disk | FTP | other *** search
/ PC Home 49 / PC_Home_Issue_49.iso / winprogs / childenc / oecdemo / shared.dir / 00602.ls < prev    next >
Encoding:
Text File  |  1996-07-24  |  970 b   |  40 lines

  1. on selectMDMovie destMovie
  2.   global articleList
  3.   set moviePtr to 0
  4.   set x to the number of lines in articleList
  5.   set z to the number of items in line 1 of articleList
  6.   set moviePtr to 0
  7.   repeat with j = 1 to x
  8.     if destMovie = item 1 of line j of articleList then
  9.       set moviePtr to j
  10.       exit repeat
  11.     end if
  12.   end repeat
  13.   if moviePtr > 0 then
  14.     set MDMovie to item z of line moviePtr of articleList
  15.     if the movie <> MDMovie then
  16.       return MDMovie
  17.     else
  18.       return 0
  19.     end if
  20.   else
  21.     return 0
  22.   end if
  23. end
  24.  
  25. on searchForItem theItem
  26.   global searchList, CR
  27.   set x to the number of lines in searchList
  28.   set foundItems to EMPTY
  29.   repeat with n = 1 to x
  30.     if line n of searchList contains theItem then
  31.       if foundItems = EMPTY then
  32.         set foundItems to item 1 of line n of searchList
  33.         next repeat
  34.       end if
  35.       put CR & item 1 of line n of searchList after foundItems
  36.     end if
  37.   end repeat
  38.   return foundItems
  39. end
  40.