home *** CD-ROM | disk | FTP | other *** search
- on selectMDMovie destMovie
- global articleList
- set moviePtr to 0
- set x to the number of lines in articleList
- set z to the number of items in line 1 of articleList
- set moviePtr to 0
- repeat with j = 1 to x
- if destMovie = item 1 of line j of articleList then
- set moviePtr to j
- exit repeat
- end if
- end repeat
- if moviePtr > 0 then
- set MDMovie to item z of line moviePtr of articleList
- if the movie <> MDMovie then
- return MDMovie
- else
- return 0
- end if
- else
- return 0
- end if
- end
-
- on searchForItem theItem
- global searchList, CR
- set x to the number of lines in searchList
- set foundItems to EMPTY
- repeat with n = 1 to x
- if line n of searchList contains theItem then
- if foundItems = EMPTY then
- set foundItems to item 1 of line n of searchList
- next repeat
- end if
- put CR & item 1 of line n of searchList after foundItems
- end if
- end repeat
- return foundItems
- end
-