put "Click here to view list" into field "recipes found"
put newResults into field "number found"
if newResults = 0 then
put "No Recipes Found" into field "recipes found"
else
put newResults into field "number found"
end if
controlPosition(gScroll3, 0.0)
end
on showRecipes
global gRecipesFoundAndID, stopMovie, gCFTBundle, gCurrentBook, gCurrentOrAll, gRecipeIDDB, gScroll3, gRecipesFound
cursor(4)
sort(gRecipesFound)
set fandwRecipeList to "• Food and Wine:"
put RETURN after fandwRecipeList
put RETURN after fandwRecipeList
set healthyRecipeList to "• Healthy Cooking:"
put RETURN after healthyRecipeList
put RETURN after healthyRecipeList
set GACRecipeList to "• Great American Cooking:"
put RETURN after GACRecipeList
put RETURN after GACRecipeList
set pastaRecipeList to "• Cooking For Today - Pasta:"
put RETURN after pastaRecipeList
put RETURN after pastaRecipeList
set vegiRecipeList to "• Cooking For Today - Vegetarian:"
put RETURN after vegiRecipeList
put RETURN after vegiRecipeList
set stirRecipeList to "• Cooking For Today - Stir Fries:"
put RETURN after stirRecipeList
put RETURN after stirRecipeList
set chickRecipeList to "• Cooking For Today - Chicken:"
put RETURN after chickRecipeList
put RETURN after chickRecipeList
repeat with i in gRecipesFoundAndID
if (i > 0) and (i < 428) then
put getOne(gRecipeIDDB, i) after healthyRecipeList
put RETURN after healthyRecipeList
put RETURN after healthyRecipeList
next repeat
end if
if (i > 1000) and (i < 1613) then
put getOne(gRecipeIDDB, i) after GACRecipeList
put RETURN after GACRecipeList
put RETURN after GACRecipeList
next repeat
end if
if (i > 1700) and (i < 1773) then
put getOne(gRecipeIDDB, i) after pastaRecipeList
put RETURN after pastaRecipeList
put RETURN after pastaRecipeList
next repeat
end if
if (i > 1800) and (i < 1869) then
put getOne(gRecipeIDDB, i) after vegiRecipeList
put RETURN after vegiRecipeList
put RETURN after vegiRecipeList
next repeat
end if
if (i > 1900) and (i < 1969) then
put getOne(gRecipeIDDB, i) after stirRecipeList
put RETURN after stirRecipeList
put RETURN after stirRecipeList
next repeat
end if
if (i > 2000) and (i < 2069) then
put getOne(gRecipeIDDB, i) after chickRecipeList
put RETURN after chickRecipeList
put RETURN after chickRecipeList
next repeat
end if
if (i > 2999) and (i < 3223) then
put getOne(gRecipeIDDB, i) after fandwRecipeList
put RETURN after fandwRecipeList
put RETURN after fandwRecipeList
next repeat
end if
nothing()
end repeat
set recipesFoundText to EMPTY
if the number of lines in chickRecipeList > 3 then
put chickRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
if the number of lines in pastaRecipeList > 3 then
put pastaRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
if the number of lines in stirRecipeList > 3 then
put stirRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
if the number of lines in vegiRecipeList > 3 then
put vegiRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
if gCurrentOrAll = "All" then
if the number of lines in fandwRecipeList > 3 then
put fandwRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
if the number of lines in GACRecipeList > 3 then
put GACRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
if the number of lines in healthyRecipeList > 3 then
put healthyRecipeList after recipesFoundText
put RETURN after recipesFoundText
end if
put the number of lines in recipesFoundText
if the number of lines in recipesFoundText < 1500 then
put recipesFoundText into field "recipes found"
else
put line 1 to 1500 of recipesFoundText into field "first half"
put RETURN after field "first half"
put RETURN after field "first half"
put "Click here to see more recipes" after field "first half"
put RETURN after field "first half"
put field "first half" into field "recipes found"
put line 1501 to the number of lines in recipesFoundText of recipesFoundText into field "second half"
put RETURN after field "second half"
put "Click here to see more recipes " after field "second half"
put RETURN after field "second half"
nothing()
end if
else
if gCFTBundle = 1 then
put recipesFoundText into field "recipes found"
else
if gCurrentBook = "Pasta" then
set tempOut to line 3 to the number of lines in pastaRecipeList of pastaRecipeList
if the number of lines in tempOut >= 1 then
put tempOut into field "recipes found"
end if
else
if gCurrentBook = "Vegi" then
set tempOut to line 3 to the number of lines in vegiRecipeList of vegiRecipeList
if the number of lines in tempOut >= 1 then
put tempOut into field "recipes found"
end if
else
if gCurrentBook = "Stir" then
set tempOut to line 3 to the number of lines in stirRecipeList of stirRecipeList
if the number of lines in tempOut >= 1 then
put tempOut into field "recipes found"
end if
else
if gCurrentBook = "Chick" then
set tempOut to line 3 to the number of lines in chickRecipeList of chickRecipeList
if the number of lines in tempOut >= 1 then
put tempOut into field "recipes found"
end if
end if
end if
end if
end if
end if
end if
controlPosition(gScroll3, 0.0)
cursor(-1)
end
on dishesMenu
global gDishesMenu
set gDishesMenu to birth(script "pull down menu", 45, 46, the number of cast "large menu", the number of cast "large button", "dishes", "Any Type of Dish" & RETURN & "Appetizers & Snacks" & RETURN & "Main Dishes" & RETURN & "Side Dishes, Breads & Rolls" & RETURN & "Soups, Salads & Sandwiches" & RETURN & "Desserts & Beverages", "DBChooser")
end
on timesMenu
global gTimesMenu
set gTimesMenu to birth(script "pull down menu", 42, 43, the number of cast "large menu", the number of cast "large button", "times", "Any Length of Time" & RETURN & "Less than 15 minutes" & RETURN & "Less than 30 minutes" & RETURN & "Less than 1 hour" & RETURN & "Less than 2 hours" & RETURN & "Less than 4 hours", "DBChooser")
end
on fatMenu
global gFatMenu
set gFatMenu to birth(script "pull down menu", 39, 40, the number of cast "small menu2", the number of cast "small button", "fat", "Any Amount" & RETURN & "Low: < 3 g", "DBChooser")
end
on saturatedMenu
global gSaturatedMenu
set gSaturatedMenu to birth(script "pull down menu", 36, 37, the number of cast "small menu2", the number of cast "small button", "saturated", "Any Amount" & RETURN & "Low: < 1 g", "DBChooser")
end
on sodiumMenu
global gSodiumMenu
set gSodiumMenu to birth(script "pull down menu", 33, 34, the number of cast "small menu3", the number of cast "small button", "sodium", "Any Amount" & RETURN & "Low: < 140 mg" & RETURN & "Very low: < 35 mg", "DBChooser")
end
on caloriesMenu
global gCaloriesMenu
set gCaloriesMenu to birth(script "pull down menu", 30, 31, the number of cast "small menu2", the number of cast "small button", "calories", "Any Amount" & RETURN & "Low: < 40", "DBChooser")
end
on carbohydratesMenu
global gCarbohydratesMenu
set gCarbohydratesMenu to birth(script "pull down menu", 27, 28, the number of cast "small menu3", the number of cast "small button", "carbohydrates", "Any Amount" & RETURN & "Good source: > 30 g" & RETURN & "High in: > 60 g", "DBChooser")
end
on cholesterolMenu
global gCholesterolMenu
set gCholesterolMenu to birth(script "pull down menu", 24, 25, the number of cast "small menu2", the number of cast "small button", "cholesterol", "Any Amount" & RETURN & "Low: < 20 mg", "DBChooser")
end
on potassiumMenu
global gPotassiumMenu
set gPotassiumMenu to birth(script "pull down menu", 21, 22, the number of cast "small menu3", the number of cast "small button", "potassium", "Any Amount" & RETURN & "Good source: > 330 mg" & RETURN & "High in: > 700 mg", "DBChooser")
end
on makeScrolls
global gScroll1, gScroll2, gScroll3, gCurrentOrAll, gCFTBook
cleanLegos()
set track to new("Button", [#spriteChan: 9])
set ball to new("Button", [#spriteChan: 10, #pressedCast: 56])
set up to new("Button", [#spriteChan: 11, #pressedCast: 58])
set down to new("Button", [#spriteChan: 12, #pressedCast: 60])
if gCurrentOrAll = "All" then
set gScroll1 to new("ScrollBar", [#scrollField: "a-e text" & gCurrentOrAll, #scrollFieldOut: 4, #minButton: up, #maxButton: down, #thumbButton: ball, #trackButton: track])