home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / Internal_66_tarInfo2temp.1.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  1.1 KB  |  28 lines

  1. on mouseUp
  2.   global RecipeNum, StartingLine, Choice
  3.   if the visible of sprite 21 then
  4.     set x to the mouseH
  5.     set y to the mouseV
  6.     set lineNum to integer((y - 156) / 21) + 1
  7.     set richLine to line lineNum + StartingLine of the text of member ("recipe" & RecipeNum) of castLib "recipes2"
  8.     set checkWord to word 1 of richLine
  9.     repeat with i = 1 to the number of lines in field ("fieldRecipe" & RecipeNum)
  10.       if word 1 of line i of field ("fieldRecipe" & RecipeNum) = checkWord then
  11.         set actualLine to line i of field ("fieldRecipe" & RecipeNum)
  12.         set l1 to the number of lines in field "shop1"
  13.         if the text of field "shop1" = 0 then
  14.           set l1 to 0
  15.         end if
  16.         set l2 to the number of lines in field "shop2"
  17.         if the text of field "shop2" = 0 then
  18.           set l2 to 0
  19.         end if
  20.         put Choice into line l1 + 1 of field "shop1"
  21.         put actualLine into line l2 + 1 of field "shop2"
  22.         set the text of field "shop1temp" to line 1 to 10 of field "shop1"
  23.         set the text of field "shop2temp" to line 1 to 10 of field "shop2"
  24.       end if
  25.     end repeat
  26.   end if
  27. end
  28.