#!/bin/sh # MetaCard 2.4 stack # The following is not ASCII text, # so now would be a good time to q out of more exec mc $0 "$@" 8Fiches cuisine3!Non resizeStack revUpdateGeometry SetVScrollbars "2,3,5,6,11,12,13,14" -- end resizeStack ----------------------------------- on scrollBarDrag set the repeatRate to 50 end scrollBarDrag ----------------------------------- --on openStack -- local tRect -- ----- -- put the windowBoundingRect into tRect -- subtract 250 from item 3 of tRect -- set the windowBoundingRect to tRect --end openStack ----------------------------------- on preOpenStack if the short name of this stack <> the short name of me then exit preOpenStack put appFolder() & "Prefs" into tPrefFileName if there is a file tPrefFileName then -- set cursor to 4 put url("file:" & tPrefFileName) into tPrefs set the rect of this stack to line 1 of tPrefs if there is a file line 2 of tPrefs then openBook line 2 of tPrefs,true -- if line 3 of tPrefs <> empty then set the hilitedLine of fld "RecipeList" to lineOffset(line 3 of tPrefs,fld "RecipeList") else set the hilitedLine of fld "RecipeList" to 1 DisplayRecipe -- end if end if end preOpenStack ----------------------------------- on closeStack local tPrefs ----- if the short name of this stack <> the short name of me then exit closeStack ----- put the rect of this stack into tPrefs put cr & the uCurBookFilePath of this stack after tPrefs put cr & the uCurRecipe of this stack after tPrefs put tPrefs into url("file:" & appFolder() & "Prefs") -- end closeStack ----------------------------------- on linkClicked pLink local tLineNum ----- lock screen put lineOffset(InternationalToUpper(pLink),fld "RecipeList") into tLineNum if tLineNum = 0 then put lineOffset(InternationalToUpper(pLink),the uCurBook of this stack) into tLineNum if tLineNum <> 0 then put the uCurBook of this stack into fld "RecipeList" put the number of lines of fld "RecipeList" into fld "RecipeNumLabel" put "Toutes les recettes" into fld "Type" SetVScrollbars "6" -- else exit linkClicked end if else if tLineNum = the hilitedLine of fld "RecipeList" then put lineOffset(InternationalToUpper(pLink),fld "RecipeList",tLineNum) + tLineNum into tLineNum if tLineNum = 0 then exit linkClicked end if end if set the hilitedLine of fld "RecipeList" to tLineNum DisplayRecipe -- unlock screen end linkClicked ----------------------------------- on commandKeyDown pKey switch pKey case "b" case "i" case "u" put the selectedChunk into tChunk if tChunk <> empty then if not the lockText of the selectedField then if word 4 of tChunk >= word 2 of tChunk then put item itemOffset(pKey,"b,i,u") of "bold,italic,underline" into tNewStyle put the textStyle of the selectedChunk into tOldStyle ----- if tNewStyle <> tOldStyle then set the textStyle of the selectedChunk to tNewStyle else set the textStyle of the selectedChunk to "plain" end if end if end if break default pass commandKeyDown end switch end commandKeyDown ----------------------------------- on setTextStyle pStyle get the textStyle of the selectedChunk if pStyle is in it then delete item itemOffset(pStyle,it) of it set the TextStyle of the selectedChunk to it else if it = plain then set the TextStyle of the selectedChunk to pStyle else put comma&pStyle after it set the TextStyle of the selectedChunk to it end if end if end setTextStyle ----------------------------------- on arrowKey pKey -- local tCurRecipeNum,tNextRecipeNum -- ----- -- put the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) into tCurRecipeNum -- if tCurRecipeNum = empty then exit arrowkey -- if the selectedField <> empty then send "closeField" to the selectedField -- ----- -- switch pKey -- case "Left" -- if tCurRecipeNum = 1 then put the number of lines of fld "RecipeList" of stack (the mainStack of this stack) into tNextRecipeNum -- else put tCurRecipeNum - 1 into tNextRecipeNum -- break -- case "right" -- if tCurRecipeNum = the number of lines of fld "RecipeList" of stack (the mainStack of this stack) then put 1 into tNextRecipeNum -- else put tCurRecipeNum + 1 into tNextRecipeNum -- break -- case "up" -- put 1 into tNextRecipeNum -- break -- case "down" -- put the number of lines of fld "RecipeList" of stack (the mainStack of this stack) into tNextRecipeNum -- end switch -- ----- -- set the hilitedLine of fld "RecipeList" to tNextRecipeNum -- DisplayRecipe -- S end arrowKey ----------------------------------- function GetAnswer pPrompt,pAlertType,pBtn1,pDefaultBtn put the defaultStack into tDefaultStack set the defaultStack to the mainStack of this stack ----- put pPrompt into fld "ConvertToHTML" set the textStyle of line 1 of fld "ConvertToHTML" to bold set the textStyle of line 2 of fld "ConvertToHTML" to italic set the textSize of line 2 of fld "ConvertToHTML" to 12 put the htmlText of fld "ConvertToHTML" into tPrompt ----- set the defaultStack to tDefaultStack switch pAlertType -- can't put it into a variable !!! case "info" if pDefaultBtn = empty then answer information tPrompt with pBtn1 as sheet else answer information tPrompt with pBtn1 or pDefaultBtn as sheet break case "question" if pDefaultBtn = empty then answer question tPrompt with pBtn1 as sheet else answer question tPrompt with pBtn1 or pDefaultBtn as sheet break case "error" if pDefaultBtn = empty then answer error tPrompt with pBtn1 as sheet else answer error tPrompt with pBtn1 or pDefaultBtn as sheet break case "warning" if pDefaultBtn = empty then answer warning tPrompt with pBtn1 as sheet else answer warning tPrompt with pBtn1 or pDefaultBtn as sheet break default if pDefaultBtn = empty then answer tPrompt with pBtn1 as sheet else answer tPrompt with pBtn1 or pDefaultBtn as sheet end switch return it end GetAnswer ----------------------------------- on CleanStack set the uCurBook of this stack to empty set the uCurRecipe of this stack to empty set the uCurBookFilePath of this stack to empty ----- put empty into fld "RecipeList" put empty into fld "RecipeNumLabel" put empty into fld "Book" put empty into fld "RecipeName" put empty into fld "Type" put empty into fld "Search" put empty into fld "FoldersList" of stack "NewBook" put btn "Tabs" into tItems repeat with i = 1 to 3 put empty into fld (line i of tItems) put empty into fld ((line i of tItems) & 2) end repeat ----- disable btn "Tabs" hide btn "RecipePopUp" hide btn "StopSearch" hide grp "Commands" hide grp "NavArrows" hide grp "Search" ----- SetVScrollbars "2,3,5,6,11,12,13,14" -- ----- set the htmlText of fld "Title" of stack "PrintA4" to empty set the htmlText of fld "Ingredients" of stack "PrintA4" to empty set the htmlText of fld "Recipe" of stack "PrintA4" to empty put empty into fld "Infos" of stack "PrintA4" ----- if the environment = "development" then save this stack end CleanStack --------------------------------------- on OpenBook pPath,pFlag local tBookName ----- set the itemDel to slash put last item of pPath into tBookName ----- put url("file:" & pPath) into tBook set the itemDel to tab if "PREF_" & space is not in item 2 of tBook then beep put quote & tBookName & quote && "n'est pas un livre de cuisine." \ & cr & "Recherchez-en un autre." into tPrompt put GetAnswer(tPrompt,"error","OK") into tAnswer -- else lock screen set cursor to 4 ----- sort tBook international put tBook into fld "RecipeList" put tBookName into fld "Book" put "Toutes les recettes" into fld "Type" set the uCurBook of this stack to tBook put the number of lines of tBook into fld "RecipeNumLabel" ------ if not pFlag then set the hilitedLine of fld "RecipeList" to 1 DisplayRecipe -- S end if ------ enable btn "Tabs" show btn "RecipePopUp" show grp "Commands" show grp "NavArrows" show grp "Search" unlock screen SetTypePopUp tBook -- set the uCurBookFilePath of this stack to pPath end if end OpenBook ----------------------------------- on DisplayNewRecipe lock screen set the itemDel to tab put the defaultStack into tDefaultStack set the defaultStack to the mainStack of this stack put the uNewRecipe of this stack into tStandardRecipe put the short system date into word 2 of item 15 of tStandardRecipe put the short system date into word 2 of item 16 of tStandardRecipe ----- put the uCurBook of this stack into tBook if tStandardRecipe is among the lines of tBook then put tBook into fld "RecipeList" put the number of lines of tBook into fld "RecipeNumLabel" put "Toutes les recettes" into fld "Type" set the hilitedLine of fld "RecipeList" to lineOffset(tStandardRecipe,tBook) DisplayRecipe -- unlock screen beep exit DisplayNewRecipe end if if tBook <> empty then put cr & tStandardRecipe after tBook else put tStandardRecipe into tBook sort tBook set the uCurBook of this stack to tBook ----- put tBook into fld "RecipeList" put the number of lines of tBook into fld "RecipeNumLabel" put "Toutes les recettes" into fld "Type" set the hilitedLine of fld "RecipeList" to lineOffset(tStandardRecipe,tBook) DisplayRecipe -- S ----- if (the icon of btn "EditRecipe" of stack "Tools" <> 1054) then set the icon of btn "EditRecipe" of stack "Tools" to 1054 EditFields -- S select text of fld "RecipeName" if "Tools" is not among the lines of the windows then DisplayRecipeInfos -- S set the height of stack "Tools" to the height of this stack - 40 drawer stack "Tools" at right of this stack aligned to top end if unlock screen with visual wipe right very fast set the defaultStack to tDefaultStack ----- end DisplayNewRecipe ----------------------------------- on DisplayRecipe local tRecipe ----- set the defaultStack to me put the hilitedText of fld "RecipeList" into tRecipe set the itemDel to tab ----- lock screen put item 1 of tRecipe into fld "RecipeName" ----- repeat with i = 3 to 5 put ConvertReturns(word 2 to -1 of item i of tRecipe) into tText put (line (i-2) of btn "Tabs") into tFldName set the htmlText of fld tFldName to tText set the htmlText of fld (tFldName & 2) to tText end repeat ----- if "Tools" is among the lines of the windows then DisplayRecipeInfos tRecipe -- ----- SetVScrollbars "2,3,5,6,11,12,13,14" -- unlock screen set the uCurRecipe of this stack to tRecipe end DisplayRecipe ---------------------------- on DisplayRecipeInfos pRecipe set the itemDel to tab ----- if pRecipe = empty then set the hilite of btn "Preferred" of stack "Tools" to false ----- put empty into fld "Type" of stack "Tools" ----- set the hilite of btn "Hot" of stack "Tools" to false set the hilite of btn "Cold" of stack "Tools" to false ----- put empty into fld "TimePrep" of stack "Tools" put empty into fld "TimeCook" of stack "Tools" ----- DisplayStars 1019,true,0 -- DisplayStars 1027,true,0 -- DisplayStars 1044,true,0 -- DisplayStars 1052,true,0 -- DisplayStars 1060,true,0 -- ----- put empty into fld "CreationDate" of stack "Tools" put empty into fld "ModifDate" of stack "Tools" else set the hilite of btn "Preferred" of stack "Tools" to word 2 of item 2 of pRecipe ----- put word 2 to -1 of item 6 of pRecipe into fld "Type" of stack "Tools" ----- set the hilite of btn "Hot" of stack "Tools" to word 2 of item 7 of pRecipe set the hilite of btn "Cold" of stack "Tools" to word 3 of item 7 of pRecipe ----- put word 2 to -1 of item 8 of pRecipe into fld "TimePrep" of stack "Tools" put word 2 to -1 of item 9 of pRecipe into fld "TimeCook" of stack "Tools" ----- DisplayStars 1019,true,word 2 of item 10 of pRecipe -- DisplayStars 1027,true,word 2 of item 11 of pRecipe -- DisplayStars 1044,true,word 2 of item 12 of pRecipe -- DisplayStars 1052,true,word 2 of item 13 of pRecipe -- DisplayStars 1060,true,word 2 of item 14 of pRecipe -- ----- put word 2 of item 15 of pRecipe into fld "CreationDate" of stack "Tools" put word 2 of item 16 of pRecipe into fld "ModifDate" of stack "Tools" end if end DisplayRecipeInfos ---------------------------- on DisplayStars pID,pFlag,pNumOfStars local tNumOfStars ----- if not pFlag then put howManyStars() into tNumOfStars else put pNumOfStars into tNumOfStars repeat with i = pID to (pID + 4) if i - (pID - 1) <= tNumOfStars then set the icon of btn ID i of stack "Tools" to 1017 else set the icon of btn ID i of stack "Tools" to 1018 end repeat end DisplayStars ---------------------------- on UpDateBook pLineNum local tBook,tRecipe ----- set the itemDel to tab put the short system date into fld "ModifDate" of stack "Tools" put the short system date into word 2 of item 16 of line pLineNum of fld "RecipeList" of stack (the mainStack of this stack) set the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) to pLineNum ----- put the uCurBook of stack (the mainStack of this stack) into tBook put line pLineNum of fld "RecipeList" of stack (the mainStack of this stack) into tRecipe put tRecipe into line lineOffset(the uCurRecipe of stack (the mainStack of this stack),tBook) of tBook set the uCurBook of stack (the mainStack of this stack) to tBook set the uCurRecipe of stack (the mainStack of this stack) to tRecipe ----- SaveBook -- end UpDateBook ---------------------------- on SaveBook put the uCurBook of stack (the mainStack of this stack) into url("file:" & the uCurBookFilePath of stack (the mainStack of this stack)) end SaveBook ---------------------------- on UpdateText pPrefix,pItem local tLineNum ----- if the hilitedText of fld "RecipeList" = empty then exit UpdateText ----- set the itemDel to tab put the hilitedLine of fld "RecipeList" into tLineNum ----- lock screen put pPrefix && ConvertReturns(the htmlText of the target) into item pItem of line tLineNum of fld "RecipeList" UpDateBook tLineNum -- MS unlock screen end UpdateText ---------------------------- on UpdateStars pID,pItemNum local i,tNumOfStars,tLineNum ----- if the hilitedText of fld "RecipeList" of stack (the mainStack of this stack) = empty then exit UpdateStars ----- repeat with i = pID to (pID + 4) if the icon of btn ID i of stack "Tools" = 1018 then exit repeat add 1 to tNumOfStars end repeat ----- set the itemDel to tab put the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) into tLineNum put word 2 of item pItemNum of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack) into tCurData if tCurData <> tNumOfStars then lock screen put tNumOfStars into word 2 of item pItemNum of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack) UpDateBook tLineNum -- MS unlock screen end if end UpdateStars ---------------------------- function howManyStars put the left of the target + 29 into tPos if the mouseH < tPos then return 1 else put (the mouseH - tPos) div 15 + 2 into tNum if tNum > 5 then return 5 else return tNum end if end howManyStars ----------------------------------- on SetVScrollbars pFldNumbers local tNum ----- repeat for each item tNum in pFldNumbers set the vScrollbar of fld tNum to (the formattedHeight of fld tNum > the height of fld tNum) end repeat end SetVScrollbars ----------------------------------- on EditFields local tEditFlag,tFldNumbers,tNum ----- -- if the selectedField <> empty then send "closeField" to the selectedField ----- put the defaultStack into tDefaultStack set the defaultStack to me ----- put (the icon of btn "EditRecipe" of stack "Tools" = 1054) into tEditFlag ----- put "1,2,3,5,11,12,13,14" into tFldNumbers lock screen repeat for each item tNum in tFldNumbers set the lockText of fld tNum to not tEditFlag end repeat if (the icon of btn "EditRecipe" of stack "Tools" = 1054) then set the icon of btn "AddDate" to 1088 else set the icon of btn "AddDate" to 1090 set the visible of btn "AddDate" to (the menuHistory of btn "Tabs" = 3) select empty unlock screen set the defaultStack to tDefaultStack set the visible of btn "Mask" of stack "Tools" to not tEditFlag ----- end EditFields --------------------------------------- on SetTypePopUp pBook local tLine,tTypeItem,tTypeList,tItems,tStartLine,tEndLine ----- set the itemDel to tab repeat for each line tLine in pBook put word 2 to -1 of item 6 of tLine into tTypeItem if tab & tTypeItem is not among the lines of tTypeList then put tab & tTypeItem & cr after tTypeList end repeat delete last char of tTypeList sort tTypeList international ----- put btn "RecipeList" of stack (the mainStack of this stack) into tItems put lineOffset("Type",tItems) + 1 into tStartLine if tStartLine = 1 then put lineOffset("(Type",tItems) + 1 into tStartLine put lineOffset("Temprature",tItems) - 1 into tEndLine put tTypeList into line tStartLine to tEndLine of tItems ----- if the number of lines of tTypeList = 1 then put "(Type" into line (tStartLine - 1) of tItems else put "Type" into line (tStartLine - 1) of tItems end if ----- put tItems into btn "RecipeList" of stack (the mainStack of this stack) end SetTypePopUp ----------------------------------- function ConvertReturns pText if "¬" is in pText then replace "¬" with "

" & cr & "

" in pText else replace "

" & cr & "

" with "¬" in pText return pText end ConvertReturns ----------------------------------- function StripExtension pList local tLine,tStrippedList ----- repeat for each line tLine in pList put char 1 to (offset(".",tLine) - 1) of tLine & cr after tStrippedList end repeat delete last char of tStrippedList return tStrippedList end StripExtension ----------------------------------- function SwitchList pList if comma is in pList then replace comma with cr in pList else replace cr with comma in pList return pList end SwitchList ----------------------------------- function AppFolder local tAppFolderName ----- put the value of word 2 of the long name of me into tAppFolderName set the itemDel to slash return item 1 to -2 of tAppFolderName & slash end AppFolder ----------------------------------- function CleanList pList local tLine,tCleanedList ----- repeat for each line tLine in pList if char 1 of tLine <> "." then put tLine & cr after tCleanedList end repeat delete last char of tCleanedList return tCleanedList end CleanList ----------------------------------- function InternationalToUpper pText local tChar,tText ----- repeat for each char tChar in pText put chartoNum(tChar) into tASCIIVal ----- if tASCIIVal >= 90 then if tASCIIVal >= 97 and tASCIIVal <= 122 then put numToChar(tASCIIVal-32) after tText else if tASCIIVal = 141 then put numToChar(130) after tText else if tASCIIVal = 142 then put numToChar(131) after tText else if tASCIIVal = 143 then put numToChar(233) after tText else if tASCIIVal = 136 then put numToChar(203) after tText else if tASCIIVal = 137 then put numToChar(229) after tText else if tASCIIVal = 144 then put numToChar(230) after tText else if tASCIIVal = 143 then put numToChar(233) after tText else if tASCIIVal = 207 then put numToChar(206) after tText else if tASCIIVal = 153 then put numToChar(239) after tText end if else put tChar after tText end if end repeat ----- return tText end InternationalToUpper 2 uCurBook uLibName Bibliothque uCurRecipeuCurBookFilePath uNewRecipeeSANS TITRE PREF_ false ING_

Pour x personnes :¬¬

REC_

Préparation : x mn¬Cuisson : x mn¬¬Préparation :¬

NOTES_

Origine : ¬

TYPE_ ? HOT_ false false PREPTIME_ ? mn COOKTIME_ ? mn EASY_ 0 MONEY_ 0 SPEED_ 0 ADVANCE_ 0 RATING_ 0 CREATION_ 20/05/02 MODIF_ 09/09/04 _ UGeorgiaUGeorgiaWGeorgia ULucida Grande ULucida Grande,Japanese WLucida Grande ULucida Grande WLucida Grande ULucida Grande ULucida GrandeWLucida Grande WLucida Grande ULucida GrandeULucida Grande ULucida Grande,JapaneseU Helvetica ULucida Grande ULucida Grande UTektonUTektonWTektonUTekton UTektonUTektonWLucida Grande ULucida Grande ULucida Grande ULucida Grande,Greek @ULucida GrandecRevStandaloneSettings7scriptLibrariesInternet Geometry PrintingMacOSXtrue OSX,nameFiches cuisineMacOS,documentTypeUNIX,fileSelectortrueWindowsfalseWindows,LegalCopyright#2004 All rights reserved worldwideMacOS,longVersionFiches cuisine 1.0.0.0UNIX,pageSetuptrueOSX,documentTypeLinuxfalseOdtfalse inclusionssearchWindows,documenticonFile8/Applications/Revolution 2.5/Sample Icons/genericdoc.ico answerDialogtrueSPARCfalse SolIntelfalseOSX,documentExtensionWindows,FileDescription"Fiches cuisine 1.0.0.0 for WindowsOSX,longVersionFiches cuisine 1.0.0.0OSX,copyright#2004 All rights reserved worldwideUNIX,printerChoosertrueMacOS,MinimumSize15000MacOS,versionnumber11MacOS,versionnumber20MacOS,ReleaseFinalnameFiches cuisineMacOS,versionnumber30Hp9k700falsers6000false MacOS,Region1OSX,shortVersion1.0.0.0Windows,fileversion11Windows,productversion11Windows,fileversion20Windows,productversion20Windows,fileversion30BsdfalsecursorsfalseWindows,productversion30Windows,fileversion40Windows,productversion40 OSX,infoFiches cuisine Version 1.0.0.0MacOS,dynamicMemorytrueIrisfalse askDialogtrueOSX,signature????Windows,iconFile8/Applications/Revolution 2.5/Sample Icons/genericapp.icoMacOS,PreferredSize15000Windows,ProductNameFiches cuisineUNIX,colorChoosertrue MacOSPPCfalseWindows,companyname SolSparcfalseMacOS,creator???? cREVGeneral@ scriptChecksumQD> hA1 debugObjectsIbutton id 1067 of group id 1025 of card id 1002 of stack "Fiches cuisine" handlerListpresizeStack scrollBarDrag preOpenStack closeStack linkClicked commandKeyDown setTextStyle arrowKey GetAnswer CleanStack OpenBook DisplayNewRecipe DisplayRecipe DisplayRecipeInfos DisplayStars UpDateBook SaveBook UpdateText UpdateStars howManyStars SetVScrollbars EditFields SetTypePopUp ConvertReturns StripExtension SwitchList AppFolder CleanList InternationalToUpper breakPointsscriptSelectionchar 1245 to 1244 bookmarks prevHandler preOpenStack tempScriptscript_

on resizeStack

revUpdateGeometry

SetVScrollbars "2,3,5,6,11,12,13,14" -- 

end resizeStack

-----------------------------------

on scrollBarDrag

set the repeatRate to 50

end scrollBarDrag

-----------------------------------

--on openStack

-- local tRect

-- -----

-- put the windowBoundingRect into tRect

-- subtract 250 from item 3 of tRect

-- set the windowBoundingRect to tRect

--end openStack

-----------------------------------

on preOpenStack

if the short name of this stack <> the short name of me then exit preOpenStack

put appFolder() & "Prefs" into tPrefFileName

if there is a file tPrefFileName then -- 

set cursor to 4

put url("file:" & tPrefFileName) into tPrefs

set the rect of this stack to line 1 of tPrefs

if there is a file line 2 of tPrefs then

openBook line 2 of tPrefs,true -- 

if line 3 of tPrefs <> empty then

set the hilitedLine of fld "RecipeList" to lineOffset(line 3 of tPrefs,fld "RecipeList")

else set the hilitedLine of fld "RecipeList" to 1

DisplayRecipe -- 

end if

end if

end preOpenStack

-----------------------------------

on closeStack

local tPrefs

-----

if the short name of this stack <> the short name of me then exit closeStack

-----

put the rect of this stack into tPrefs

put cr & the uCurBookFilePath of this stack after tPrefs

put cr & the uCurRecipe of this stack after tPrefs

put tPrefs into url("file:" & appFolder() & "Prefs") -- 

end closeStack

-----------------------------------

on linkClicked pLink

local tLineNum

-----

lock screen

put lineOffset(InternationalToUpper(pLink),fld "RecipeList") into tLineNum

if tLineNum = 0 then

put lineOffset(InternationalToUpper(pLink),the uCurBook of this stack) into tLineNum

if tLineNum <> 0 then

put the uCurBook of this stack into fld "RecipeList"

put the number of lines of fld "RecipeList" into fld "RecipeNumLabel"

put "Toutes les recettes" into fld "Type"

SetVScrollbars "6" -- 

else

exit linkClicked

end if

else if tLineNum = the hilitedLine of fld "RecipeList" then

put lineOffset(InternationalToUpper(pLink),fld "RecipeList",tLineNum) + tLineNum into tLineNum

if tLineNum = 0 then

exit linkClicked

end if

end if

set the hilitedLine of fld "RecipeList" to tLineNum

DisplayRecipe -- 

unlock screen

end linkClicked

-----------------------------------

on commandKeyDown pKey

switch pKey

case "b"

case "i"

case "u"

put the selectedChunk into tChunk

if tChunk <> empty then

if not the lockText of the selectedField then

if word 4 of tChunk >= word 2 of tChunk then

put item itemOffset(pKey,"b,i,u") of "bold,italic,underline" into tNewStyle

put the textStyle of the selectedChunk into tOldStyle

-----

if tNewStyle <> tOldStyle then

set the textStyle of the selectedChunk to tNewStyle

else set the textStyle of the selectedChunk to "plain"

end if

end if

end if

break

default

pass commandKeyDown

end switch

end commandKeyDown

-----------------------------------

on setTextStyle pStyle

get the textStyle of the selectedChunk

if pStyle is in it then

delete item itemOffset(pStyle,it) of it

set the TextStyle of the selectedChunk to it

else

if it = plain then set the TextStyle of the selectedChunk to pStyle

else

put comma&pStyle after it

set the TextStyle of the selectedChunk to it

end if

end if

end setTextStyle

-----------------------------------

on arrowKey pKey

-- local tCurRecipeNum,tNextRecipeNum

-- -----

-- put the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) into tCurRecipeNum

-- if tCurRecipeNum = empty then exit arrowkey

-- if the selectedField <> empty then send "closeField" to the selectedField

-- -----

-- switch pKey

-- case "Left"

-- if tCurRecipeNum = 1 then put the number of lines of fld "RecipeList" of stack (the mainStack of this stack) into tNextRecipeNum

-- else put tCurRecipeNum - 1 into tNextRecipeNum

-- break

-- case "right"

-- if tCurRecipeNum = the number of lines of fld "RecipeList" of stack (the mainStack of this stack) then put 1 into tNextRecipeNum

-- else put tCurRecipeNum + 1 into tNextRecipeNum

-- break

-- case "up"

-- put 1 into tNextRecipeNum

-- break

-- case "down"

-- put the number of lines of fld "RecipeList" of stack (the mainStack of this stack) into tNextRecipeNum

-- end switch

-- -----

-- set the hilitedLine of fld "RecipeList" to tNextRecipeNum

-- DisplayRecipe -- S

end arrowKey

-----------------------------------

function GetAnswer pPrompt,pAlertType,pBtn1,pDefaultBtn

put the defaultStack into tDefaultStack

set the defaultStack to the mainStack of this stack

-----

put pPrompt into fld "ConvertToHTML"

set the textStyle of line 1 of fld "ConvertToHTML" to bold

set the textStyle of line 2 of fld "ConvertToHTML" to italic

set the textSize of line 2 of fld "ConvertToHTML" to 12

put the htmlText of fld "ConvertToHTML" into tPrompt

-----

set the defaultStack to tDefaultStack

switch pAlertType -- can't put it into a variable !!!

case "info"

if pDefaultBtn = empty then answer information tPrompt with pBtn1 as sheet

else answer information tPrompt with pBtn1 or pDefaultBtn as sheet

break

case "question"

if pDefaultBtn = empty then answer question tPrompt with pBtn1 as sheet

else answer question tPrompt with pBtn1 or pDefaultBtn as sheet

break

case "error"

if pDefaultBtn = empty then answer error tPrompt with pBtn1 as sheet

else answer error tPrompt with pBtn1 or pDefaultBtn as sheet

break

case "warning"

if pDefaultBtn = empty then answer warning tPrompt with pBtn1 as sheet

else answer warning tPrompt with pBtn1 or pDefaultBtn as sheet

break

default

if pDefaultBtn = empty then answer tPrompt with pBtn1 as sheet

else answer tPrompt with pBtn1 or pDefaultBtn as sheet

end switch

return it

end GetAnswer

-----------------------------------

on CleanStack

set the uCurBook of this stack to empty

set the uCurRecipe of this stack to empty

set the uCurBookFilePath of this stack to empty

-----

put empty into fld "RecipeList"

put empty into fld "RecipeNumLabel"

put empty into fld "Book"

put empty into fld "RecipeName"

put empty into fld "Type"

put empty into fld "Search"

put empty into fld "FoldersList" of stack "NewBook"

put btn "Tabs" into tItems

repeat with i = 1 to 3

put empty into fld (line i of tItems)

put empty into fld ((line i of tItems) & 2)

end repeat

-----

disable btn "Tabs"

hide btn "RecipePopUp"

hide btn "StopSearch"

hide grp "Commands"

hide grp "NavArrows"

hide grp "Search"

-----

SetVScrollbars "2,3,5,6,11,12,13,14" -- 

-----

set the htmlText of fld "Title" of stack "PrintA4" to empty

set the htmlText of fld "Ingredients" of stack "PrintA4" to empty

set the htmlText of fld "Recipe" of stack "PrintA4" to empty

put empty into fld "Infos" of stack "PrintA4"

-----

if the environment = "development" then save this stack

end CleanStack

---------------------------------------

on OpenBook pPath,pFlag

local tBookName

-----

set the itemDel to slash

put last item of pPath into tBookName

-----

put url("file:" & pPath) into tBook

set the itemDel to tab

if "PREF_" & space is not in item 2 of tBook then

beep

put quote & tBookName & quote && "n'est pas un livre de cuisine." \

& cr & "Recherchez-en un autre." into tPrompt

put GetAnswer(tPrompt,"error","OK") into tAnswer -- 

else

lock screen

set cursor to 4

-----

sort tBook international

put tBook into fld "RecipeList"

put tBookName into fld "Book"

put "Toutes les recettes" into fld "Type"

set the uCurBook of this stack to tBook

put the number of lines of tBook into fld "RecipeNumLabel"

------

if not pFlag then

set the hilitedLine of fld "RecipeList" to 1

DisplayRecipe -- S

end if

------

enable btn "Tabs"

show btn "RecipePopUp"

show grp "Commands"

show grp "NavArrows"

show grp "Search"

unlock screen

SetTypePopUp tBook -- 

set the uCurBookFilePath of this stack to pPath

end if

end OpenBook

-----------------------------------

on DisplayNewRecipe

lock screen

set the itemDel to tab

put the defaultStack into tDefaultStack

set the defaultStack to the mainStack of this stack

put the uNewRecipe of this stack into tStandardRecipe

put the short system date into word 2 of item 15 of tStandardRecipe

put the short system date into word 2 of item 16 of tStandardRecipe

-----

put the uCurBook of this stack into tBook

if tStandardRecipe is among the lines of tBook then

put tBook into fld "RecipeList"

put the number of lines of tBook into fld "RecipeNumLabel"

put "Toutes les recettes" into fld "Type"

set the hilitedLine of fld "RecipeList" to lineOffset(tStandardRecipe,tBook)

DisplayRecipe -- 

unlock screen

beep

exit DisplayNewRecipe

end if

if tBook <> empty then put cr & tStandardRecipe after tBook

else put tStandardRecipe into tBook

sort tBook

set the uCurBook of this stack to tBook

-----

put tBook into fld "RecipeList"

put the number of lines of tBook into fld "RecipeNumLabel"

put "Toutes les recettes" into fld "Type"

set the hilitedLine of fld "RecipeList" to lineOffset(tStandardRecipe,tBook)

DisplayRecipe -- S

-----

if (the icon of btn "EditRecipe" of stack "Tools" <> 1054) then set the icon of btn "EditRecipe" of stack "Tools" to 1054

EditFields -- S

select text of fld "RecipeName"

if "Tools" is not among the lines of the windows then

DisplayRecipeInfos -- S

set the height of stack "Tools" to the height of this stack - 40

drawer stack "Tools" at right of this stack aligned to top

end if

unlock screen with visual wipe right very fast

set the defaultStack to tDefaultStack

-----

end DisplayNewRecipe

-----------------------------------

on DisplayRecipe

local tRecipe

-----

set the defaultStack to me

put the hilitedText of fld "RecipeList" into tRecipe

set the itemDel to tab

-----

lock screen

put item 1 of tRecipe into fld "RecipeName"

-----

repeat with i = 3 to 5

put ConvertReturns(word 2 to -1 of item i of tRecipe) into tText

put (line (i-2) of btn "Tabs") into tFldName

set the htmlText of fld tFldName to tText

set the htmlText of fld (tFldName & 2) to tText

end repeat

-----

if "Tools" is among the lines of the windows then DisplayRecipeInfos tRecipe -- 

-----

SetVScrollbars "2,3,5,6,11,12,13,14" -- 

unlock screen

set the uCurRecipe of this stack to tRecipe

end DisplayRecipe

----------------------------

on DisplayRecipeInfos pRecipe

set the itemDel to tab

-----

if pRecipe = empty then

set the hilite of btn "Preferred" of stack "Tools" to false

-----

put empty into fld "Type" of stack "Tools"

-----

set the hilite of btn "Hot" of stack "Tools" to false

set the hilite of btn "Cold" of stack "Tools" to false

-----

put empty into fld "TimePrep" of stack "Tools"

put empty into fld "TimeCook" of stack "Tools"

-----

DisplayStars 1019,true,0 -- 

DisplayStars 1027,true,0 -- 

DisplayStars 1044,true,0 -- 

DisplayStars 1052,true,0 -- 

DisplayStars 1060,true,0 -- 

-----

put empty into fld "CreationDate" of stack "Tools"

put empty into fld "ModifDate" of stack "Tools"

else

set the hilite of btn "Preferred" of stack "Tools" to word 2 of item 2 of pRecipe

-----

put word 2 to -1 of item 6 of pRecipe into fld "Type" of stack "Tools"

-----

set the hilite of btn "Hot" of stack "Tools" to word 2 of item 7 of pRecipe

set the hilite of btn "Cold" of stack "Tools" to word 3 of item 7 of pRecipe

-----

put word 2 to -1 of item 8 of pRecipe into fld "TimePrep" of stack "Tools"

put word 2 to -1 of item 9 of pRecipe into fld "TimeCook" of stack "Tools"

-----

DisplayStars 1019,true,word 2 of item 10 of pRecipe -- 

DisplayStars 1027,true,word 2 of item 11 of pRecipe -- 

DisplayStars 1044,true,word 2 of item 12 of pRecipe -- 

DisplayStars 1052,true,word 2 of item 13 of pRecipe -- 

DisplayStars 1060,true,word 2 of item 14 of pRecipe -- 

-----

put word 2 of item 15 of pRecipe into fld "CreationDate" of stack "Tools"

put word 2 of item 16 of pRecipe into fld "ModifDate" of stack "Tools"

end if

end DisplayRecipeInfos

----------------------------

on DisplayStars pID,pFlag,pNumOfStars

local tNumOfStars

-----

if not pFlag then

put howManyStars() into tNumOfStars

else put pNumOfStars into tNumOfStars

repeat with i = pID to (pID + 4)

if i - (pID - 1) <= tNumOfStars then set the icon of btn ID i of stack "Tools" to 1017

else set the icon of btn ID i of stack "Tools" to 1018

end repeat

end DisplayStars

----------------------------

on UpDateBook pLineNum

local tBook,tRecipe

-----

set the itemDel to tab

put the short system date into fld "ModifDate" of stack "Tools"

put the short system date into word 2 of item 16 of line pLineNum of fld "RecipeList" of stack (the mainStack of this stack)

set the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) to pLineNum

-----

put the uCurBook of stack (the mainStack of this stack) into tBook

put line pLineNum of fld "RecipeList" of stack (the mainStack of this stack) into tRecipe

put tRecipe into line lineOffset(the uCurRecipe of stack (the mainStack of this stack),tBook) of tBook

set the uCurBook of stack (the mainStack of this stack) to tBook

set the uCurRecipe of stack (the mainStack of this stack) to tRecipe

-----

SaveBook -- 

end UpDateBook

----------------------------

on SaveBook

put the uCurBook of stack (the mainStack of this stack) into url("file:" & the uCurBookFilePath of stack (the mainStack of this stack))

end SaveBook

----------------------------

on UpdateText pPrefix,pItem

local tLineNum

-----

if the hilitedText of fld "RecipeList" = empty then exit UpdateText

-----

set the itemDel to tab

put the hilitedLine of fld "RecipeList" into tLineNum

-----

lock screen

put pPrefix && ConvertReturns(the htmlText of the target) into item pItem of line tLineNum of fld "RecipeList"

UpDateBook tLineNum -- MS

unlock screen

end UpdateText

----------------------------

on UpdateStars pID,pItemNum

local i,tNumOfStars,tLineNum

-----

if the hilitedText of fld "RecipeList" of stack (the mainStack of this stack) = empty then exit UpdateStars

-----

repeat with i = pID to (pID + 4)

if the icon of btn ID i of stack "Tools" = 1018 then exit repeat

add 1 to tNumOfStars

end repeat

-----

set the itemDel to tab

put the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) into tLineNum

put word 2 of item pItemNum of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack) into tCurData

if tCurData <> tNumOfStars then

lock screen

put tNumOfStars into word 2 of item pItemNum of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack)

UpDateBook tLineNum -- MS

unlock screen

end if

end UpdateStars

----------------------------

function howManyStars

put the left of the target + 29 into tPos

if the mouseH < tPos then return 1

else

put (the mouseH - tPos) div 15 + 2 into tNum

if tNum > 5 then return 5

else return tNum

end if

end howManyStars

-----------------------------------

on SetVScrollbars pFldNumbers

local tNum

-----

repeat for each item tNum in pFldNumbers

set the vScrollbar of fld tNum to (the formattedHeight of fld tNum > the height of fld tNum)

end repeat

end SetVScrollbars

-----------------------------------

on EditFields

local tEditFlag,tFldNumbers,tNum

-----

-- if the selectedField <> empty then send "closeField" to the selectedField

-----

put the defaultStack into tDefaultStack

set the defaultStack to me

-----

put (the icon of btn "EditRecipe" of stack "Tools" = 1054) into tEditFlag

-----

put "1,2,3,5,11,12,13,14" into tFldNumbers

lock screen

repeat for each item tNum in tFldNumbers

set the lockText of fld tNum to not tEditFlag

end repeat

if (the icon of btn "EditRecipe" of stack "Tools" = 1054) then set the icon of btn "AddDate" to 1088

else set the icon of btn "AddDate" to 1090

set the visible of btn "AddDate" to (the menuHistory of btn "Tabs" = 3)

select empty

unlock screen

set the defaultStack to tDefaultStack

set the visible of btn "Mask" of stack "Tools" to not tEditFlag

-----

end EditFields

---------------------------------------

on SetTypePopUp pBook

local tLine,tTypeItem,tTypeList,tItems,tStartLine,tEndLine

-----

set the itemDel to tab

repeat for each line tLine in pBook

put word 2 to -1 of item 6 of tLine into tTypeItem

if tab & tTypeItem is not among the lines of tTypeList then put tab & tTypeItem & cr after tTypeList

end repeat

delete last char of tTypeList

sort tTypeList international

-----

put btn "RecipeList" of stack (the mainStack of this stack) into tItems

put lineOffset("Type",tItems) + 1 into tStartLine

if tStartLine = 1 then put lineOffset("(Type",tItems) + 1 into tStartLine

put lineOffset("Température",tItems) - 1 into tEndLine

put tTypeList into line tStartLine to tEndLine of tItems

-----

if the number of lines of tTypeList = 1 then

put "(Type" into line (tStartLine - 1) of tItems

else

put "Type" into line (tStartLine - 1) of tItems

end if

-----

put tItems into btn "RecipeList" of stack (the mainStack of this stack)

end SetTypePopUp

-----------------------------------

function ConvertReturns pText

if "&not;" is in pText then replace "&not;" with "</p>" & cr & "<p>" in pText

else replace "</p>" & cr & "<p>" with "&not;" in pText

return pText

end ConvertReturns

-----------------------------------

function StripExtension pList

local tLine,tStrippedList

-----

repeat for each line tLine in pList

put char 1 to (offset(".",tLine) - 1) of tLine & cr after tStrippedList

end repeat

delete last char of tStrippedList

return tStrippedList

end StripExtension

-----------------------------------

function SwitchList pList

if comma is in pList then replace comma with cr in pList

else replace cr with comma in pList

return pList

end SwitchList

-----------------------------------

function AppFolder

local tAppFolderName

-----

put the value of word 2 of the long name of me into tAppFolderName

set the itemDel to slash

return item 1 to -2 of tAppFolderName & slash

end AppFolder

-----------------------------------

function CleanList pList

local tLine,tCleanedList

-----

repeat for each line tLine in pList

if char 1 of tLine <> "." then put tLine & cr after tCleanedList

end repeat

delete last char of tCleanedList

return tCleanedList

end CleanList

-----------------------------------

function InternationalToUpper pText

local tChar,tText

-----

repeat for each char tChar in pText

put chartoNum(tChar) into tASCIIVal

-----

if tASCIIVal >= 90 then

if tASCIIVal >= 97 and tASCIIVal <= 122 then

put numToChar(tASCIIVal-32) after tText

else if tASCIIVal = 141 then

put numToChar(130) after tText

else if tASCIIVal = 142 then

put numToChar(131) after tText

else if tASCIIVal = 143 then

put numToChar(233) after tText

else if tASCIIVal = 136 then

put numToChar(203) after tText

else if tASCIIVal = 137 then

put numToChar(229) after tText

else if tASCIIVal = 144 then

put numToChar(230) after tText

else if tASCIIVal = 143 then

put numToChar(233) after tText

else if tASCIIVal = 207 then

put numToChar(206) after tText

else if tASCIIVal = 153 then

put numToChar(239) after tText

end if

else

put tChar after tText

end if

end repeat

-----

return tText

end InternationalToUpper

cREVGeometryCachestackID4152 @ cREVGeneral bookmarks handlerListscriptSelection char 1 to 0 prevHandler tempScriptscriptcREVGeometryCacheIDsF10941123402581114109354995225310551093620712883104310935228596531036109411451404511211093510162273102410935371767341049109368507744610841093697998805108710936980300301089109411299921211181093443423038102010935117901111026109353631897010461093440401923101110936784278361074109354995213610541094054324566107110940543245671076109344163603110141094650477070107910946504770691086109344163618410821093508428442102310946504770711081109367842769010721094553969569198810935271304921042109367990755310771093685077510108510936406513461063109352214917810331094034007342110110935234129431038109369799886610881093536357350104810935371768171050109368049762310801094650483831269310934416359691013109344163623510831093620832059105910941976036751163109352245021110351093522875953103710936404013571062109403650608911021093441636084101510935107038401025109367842790910751093700181551109010934339892261003109473279433236451093521389399103210936813199781082109405442282011091093681319979108310934377056961008109353674277010511093678427762107310940281017431067109352226909210341094112837199111610935363112681045109352786895310441093679907631107810934350932621006109411237343411151093441636135101610938959008731092cREVGeometrycacheorder1093510162273 1093640651346 1093511790111 1093440401923 1093437705696 1093510703840 1093521389399 1094054422820 1094112999212 1094114514045 1094650483831 1093443423038 1093523412943 1094112340258 1094112837199 1094650477071 1093435093262 1093433989226total70':;  0123568<=?@ABDMNU[ =Title i # cREVGeometry Master,expectedRect 16,5,428,40Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistancefalseMastertrueMaster,scalerightAbsolutetrueMaster,scalerighttrueMaster,scalerightDistance-266Master,scalerightObjectRef 1093510703840Master,scalerightObjectSiderightMaster,cardRanking0Master,scaleleftDistanceMaster,scaletopDistance cREVGeneral revUniqueID 1093435093262  RecipeName+fon closeField local tLineNum ----- if the hilitedText of fld "RecipeList" of stack (the mainStack of this stack) = empty then exit closeField ----- set the itemDel to tab if target = empty then beep put item 1 of the hilitedText of fld "RecipeList" of stack (the mainStack of this stack) into target select text of the target exit closeField end if ----- put InternationalToUpper(target) into target ----- put the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) into tLineNum put item 1 of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack) into tCurData ----- if tCurData <> target then lock screen put target into item 1 of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack) UpDateBook tLineNum -- MS unlock screen end if end closeField @& cREVGeometry Master,expectedRect 17,5,427,43Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistancefalseMastertrueMaster,scalerightAbsolutetrueMaster,scalerighttrueMaster,scalerightDistance-268Master,scalerightObjectRef 1093510703840Master,scalerightObjectSiderightMaster,cardRanking0Master,scaleleftDistanceMaster,scaletopDistance cREVGeneralscriptChecksum:;٪ D revUniqueID 1093433989226 bookmarks handlerList closeField tempScript prevHandler closeFieldscriptSelectionchar 869 to 868script Z

on closeField

local tLineNum

-----

if the hilitedText of fld "RecipeList" of stack (the mainStack of this stack) = empty then exit closeField

-----

set the itemDel to tab

if target = empty then

beep

put item 1 of the hilitedText of fld "RecipeList" of stack (the mainStack of this stack) into target

select text of the target

exit closeField

end if

-----

put InternationalToUpper(target) into target

-----

put the hilitedLine of fld "RecipeList" of stack (the mainStack of this stack) into tLineNum

put item 1 of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack) into tCurData

-----

if tCurData <> target then

lock screen

put target into item 1 of line tLineNum of fld "RecipeList" of stack (the mainStack of this stack)

UpDateBook tLineNum -- MS

unlock screen

end if

end closeField

 + gris.png @B!PNG  IHDR!G pHYs  gAMA|Q cHRMz%u0`:o_FIDATxڴ 0([:[=$tHbfLT=rļy~Ç ?;V^^^111DFb\pϟ-b055KS?~dxӧ]v@| >>> |||4 @X\\̿|2@1 `&hAf0>X H%P|ׯ_dd###  d9p*!?~1rD m#f=χRD]F-_Hܚ菴Fn8ahM|ĂB}j8D 4O QvP]P;9 TG)@| Ȩ V0{.e gDq@`(3B?R3$@/T/#H" GE w ^x9Dc 1)))TS ?50s J@G# X PC`32D`Xg8g1݀ĂtDr $Ass)Da SN6Vj`G` G}d?@ -~: 'OmM7j?n  pPD[ZZC 3g%Å @4O+jژF1#@1A O9Ԫ?g  QcIENDB` cREVGeneral revUniqueID 1093441635969Enfonc gris.png @6B!PNG  IHDR!G pHYs  gAMA|Q cHRMz%u0`:o_F_IDATxڴ 0([:[=$tHbfLT=rļy~Ç ?;V^^^111DFb\pϟ-b055KS?~dxӧ]v@| >>> |||4 @X\\̿|2@1 `&hAf0>X H%P|ׯ_dd###  d95r,?~c jKA RdDIžԁN@w w1H Zոm d@\ T'#P# b2 `=!@:HC@Fgu0*?038 X0 d#,pàĀA{h*DZH# Ϟ='9JIId@pG 0=[@ Pr""GP!E@$ ><@ Ɏ8w, Xh@.$0hnrN>#CČVjy##(. Ԑ˒Գ%52BCĂZ30Ó '''# E1ma@,"""&׻w B\U2E(,9ӧO`{A ׯ30 s/_2\pD>i``n3#,߿?H࠙#@*Py ZhۭIENDB` cREVGeneral revUniqueID 1093441636031 Enfonc+.png @&!PNG  IHDR!G pHYs  gAMA|Q cHRMz%u0`:o_F IDATxڴ 0([:[=$tHbfLT=rļy~Ç ?;V^^^111DFb\pϟ3<~͛7 H1s`fffae` ߿C `AbFFF9 ŋ`@!"$$@, H^^:cXXXa+8=ܸqr &P GaPrvr8fΞW2 =a# r=0aB6W NBIaZp)X71FhĂ^?#zd(5A 0+ rG3#5a_p\15]@PKDv9@,eЅ!1z+a4v ϖG%Z= Tu8n58`rَ :tr= @ AAAp a@#5[Uȉ@9X TQcdd[n[\\\68};c@>s/_2\pD8=kll@ ,A!j ($@upp5@*^?#IENDB` cREVGeneral revUniqueID 1093441636084 Enfonc-.png @6&!6PNG  IHDR!G pHYs  gAMA|Q cHRMz%u0`:o_FIDATxڴ 0([:[=$tHbfLT=rļy~Ç ?;V^^^111DFb\pϟ3<~͛7 H1s`fffae` ߿C `AbFFF9 ŋ`@!"$$@, H^^:cXXXa+8=ܸqr &P GaPg# d)(J ȗ | ` XPR/({T[@bH.9hrJ¿ ^x:ÓpDAC?F @(e׿AJJ*ΔG=gl~d'AĂ,r!n!`b0Ǡz5đ t $#R cz|dA4 < 048
>> |||4 @X\\̿|2@1 `&hAf0>X H%P|ׯ_dd###  d9"::^t)!?~1rD 'sy@Kkt(dPȠf6CGO!usڮ9agq rPB\ T' h/D!0CuAzD-2?y =038 X0 !bDr࿿P #E#L 8B P%$`ށx!%%%ؠI)x@8tΜ9 9ܔ?.Z0ˑǰ, %0s J@R"Grr(B@%V<BIA;}A 8;9Aٿ?g1݀?bANDr $|p)D @S(ޠ P , -48fF0&' PC?,K25]@FP%ŒĂZ3&PbDqJG޽-=JD1b4"""nr{ܞ)U%#CT< *@^"(( 222 O<5ܨ122b8~8jp\H+Ammii Ϝ9˗ .\`Ѡ?jcƌK$?H࠙#@*Py ]0IENDB` cREVGeneral revUniqueID 1093441636184; Normal-.png @6 !PNG  IHDR!G pHYs  gAMA|Q cHRMz%u0`:o_F|IDATxڴ 0([:[=$tHbfLT=rļy~Ç ?;V^^^111DFb\pϟ-b055KS?~dxӧ]v@| >>> |||4 @X\\̿|2@1 `&hAf0>X H%P|ׯ_dd###  d95r,?~c@,Ȋ @A0GBd#86Ăk,a8d ;X!0CuA 9 TG)@| Ȩ ADpQ`@"; X0 !bDr6 !1=0G@A-$QBRRRq|HCmBr9sPMAr2 #F(k,ĕab0_bz 3@D!'7Y8ȷ XJr~FFx܁\f;{ c K4 @W@ΩӧadFd@&x@YVgD `0OGq @Xd( 6 X899QRQpP XDDDMwށ0 &bQPYrħO AAAׯ_gax @F-PBZPjhKKKp}̙/_dp5i@M}P566f FX"ٿ A3GZU򬃃8 PiIENDB` cREVGeneral revUniqueID 1093441636235  Prsentation@j  cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect16,106,428,490Master,scalebottomDistance-47Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-290Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVGeneral revUniqueID 1093440401923   RecipeList i J cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistance-144Master,scaleBottomscaleBottomtrueMaster,scaleRightscaleBottomtrueMastertrueMaster,scaleBottomObjectRefcardMaster,moveHObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-43Master,expectedRect441,74,695,494Master,moveHObjectSiderightMaster,scaleRightAbsolutefalseMaster,scaleRightfalseMaster,scalerightDistance -0.023944Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistanceMaster,moveHAbsolutetrue Master,moveHtrue cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1093510703840 handlerListscriptSelectionchar 323 to 322 prevHandler tempScriptscript

 RecipePopUpBuaon mouseDown local tLoc ----- set the icon of me to 1077 put the bottomLeft of me into tLoc add 3 to item 2 of tLoc popUp btn "RecipeList" at tLoc end mouseDown ----------------------------------- on mouseUp set the icon of me to 1078 end mouseUp ----------------------------------- on mouseLeave set the icon of me to 1078 end mouseLeave ----------------------------------- on mouseRelease set the icon of me to 1078 end mouseRelease ----------------------------------- on mouseEnter set the tooltip of me to "Extraire des recettes du livre" && quote & fld "Book" & quote end mouseEnter @P!+Extraire des recettes du livre "Mon livre"6 cREVGeneralscriptChecksumQ~w`Q`.mK bookmarks revUniqueID 1093508428442 handlerList4mouseDown mouseUp mouseLeave mouseRelease mouseEnterscriptSelectionchar 160 to 159 prevHandlermenuPick tempScriptscriptI

on mouseDown

local tLoc

-----

set the icon of me to 1077

put the bottomLeft of me into tLoc

add 3 to item 2 of tLoc

popUp btn "RecipeList" at tLoc

end mouseDown

-----------------------------------

on mouseUp

set the icon of me to 1078

end mouseUp

-----------------------------------

on mouseLeave

set the icon of me to 1078

end mouseLeave

-----------------------------------

on mouseRelease

set the icon of me to 1078

end mouseRelease

-----------------------------------

on mouseEnter

set the tooltip of me to "Extraire des recettes du livre" && quote & fld "Book" & quote

end mouseEnter

  RecipeList 'on mouseDown focus on me DisplayRecipe -- S end mouseDown --------------------------------- on mouseMove if the mouse is down and the foregroundcolor of line (the hilitedLine of me) of me <> white then mouseDown -- end mouseMove --------------------------------- on mouseRelease mouseDown -- end mouseRelease --------------------------------- on mouseUp --DisplayRecipe -- S end mouseUp --------------------------------- on mouseEnter local tToolTip ----- switch fld "Type" case "Toutes les recettes" put "Recettes disponibles dans le livre" && quote & fld "Book" & quote into tToolTip break case "Mes recettes prfres" put "Recettes prfres dans le livre" && quote & fld "Book" & quote into tToolTip break default put "Recettes disponibles dans la catgorie" && quote & fld "Type" & quote && "du livre" && quote & fld "Book" & quote into tToolTip end switch ----- set the tooltip of me to tToolTip end mouseEnter black@k6Recettes disponibles dans la catgorie "" du livre "" cREVGeometryMaster,scaleBottomObjectSideBottomMaster,moveVObjectSidebottomMaster,scaleBottomscaleBottomtrueMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,moveVObjectRefcardMaster,scaleBottomAbsolutetrueMaster,moveVAbsolutefalseMaster,scaleBottomtrue Master,moveVfalseMaster,expectedRect447,109,689,601Master,scalebottomDistance-47Master,movevDistance -0.445065Master,scalerightDistanceMaster,cardRanking1Master,scaleleftDistanceMaster,scaletopDistance cREVGeneralscriptChecksum菟SdbaR bookmarks revUniqueID 1093443423038 handlerList3mouseDown mouseMove mouseRelease mouseUp mouseEnterscriptSelectionchar 477 to 957 prevHandler mouseDown tempScriptscript <

on mouseDown

focus on me

DisplayRecipe -- S

end mouseDown

---------------------------------

on mouseMove

if the mouse is down and the foregroundcolor of line (the hilitedLine of me) of me <> white then mouseDown -- 

end mouseMove

---------------------------------

on mouseRelease

mouseDown -- 

end mouseRelease

---------------------------------

on mouseUp

--DisplayRecipe -- S

end mouseUp

---------------------------------

on mouseEnter

local tToolTip

-----

switch fld "Type"

case "Toutes les recettes"

put "Recettes disponibles dans le livre" && quote & fld "Book" & quote into tToolTip

break

case "Mes recettes préférées"

put "Recettes préférées dans le livre" && quote & fld "Book" & quote into tToolTip

break

default

put "Recettes disponibles dans la catégorie" && quote & fld "Type" & quote && "du livre" && quote & fld "Book" & quote into tToolTip

end switch

-----

set the tooltip of me to tToolTip

end mouseEnter

 #Type  Oon mouseEnter set the tooltip of me to "Extraction actuelle" end mouseEnter PExtraction actuelle cREVGeneralscriptChecksum.0;(5?=~x revUniqueID 1093620832059 bookmarks handlerList mouseEnter tempScript prevHandler mouseEnterscriptSelection char 15 to 14script

on mouseEnter

set the tooltip of me to "Extraction actuelle"

end mouseEnter

&RecipeNumLabel  ----------------------------------- on mouseEnter set the tooltip of me to "Nombre de recettes disponibles dans la catgorie" && quote & fld "Type" & quote && "du livre" && quote & fld "Book" & quote end mouseEnter S0\Nombre de recettes disponibles dans la catgorie "Toutes les recettes" du livre "Mon livre" cREVGeneralscriptChecksumRW<"7{zN revUniqueID 1093640401357 bookmarks handlerList mouseEnter tempScript prevHandlerscriptSelectionchar 149 to 148script

-----------------------------------

on mouseEnter

set the tooltip of me to "Nombre de recettes disponibles dans la catégorie" && quote & fld "Type" & quote && "du livre" && quote & fld "Book" & quote

end mouseEnter

+ RecipeList u "on menuPick pItem local tCatChoice,tUserChoice,tCurRecipe,tCurBook,tFilterString,tLineNum ----- set cursor to 4 if the optionKey is down then put fld "RecipeList" into tCurBook else put the uCurBook of this stack into tCurBook ----- set the itemDel to "|" put item 1 of pItem into tCatChoice put last item of pItem into tUserChoice put the hilitedText of fld "RecipeList" into tCurRecipe ----- set the itemDel to comma set the wholeMatches to true ----- switch tCatChoice case "Toutes les recettes" put empty into tFilterString break case "Mes recettes prfres" put "PREF_ true" into tFilterString break case "Type" put "TYPE_" && tUserChoice into tFilterString break case "Temprature" put "HOT_" && item itemOffset(tUserChoice,"Plat chaud,Plat froid,Plat chaud ou froid") of "true false,false true,true true" into tFilterString break case "Difficult" put "EASY_" && itemOffset(tUserChoice,"Trs facile,Facile,Normal,Difficile,Trs difficile") into tFilterString break case "Cot" put "MONEY_" && itemOffset(tUserChoice,"Trs conomique,conomique,Normal,Cher,Trs cher") into tFilterString break case "Temps" put "SPEED_" && itemOffset(tUserChoice,"Trs rapide,Rapide,Normal,Long,Trs long") into tFilterString break case " l'avance" put "ADVANCE_" && itemOffset(tUserChoice,"Sur le moment,Un peu avant,Partag,Le jour mme,La veille ou plus") into tFilterString break case "Classement" if tUserChoice <> "Non classes" then put "RATING_" && itemOffset(tUserChoice,"Pas du tout,Un peu,Beaucoup,Passionnment, la folie") into tFilterString else put "RATING_ 0" into tFilterString end if break end switch ----- filter tCurBook with "*" & tFilterString & "*" ----- if tCurBook = empty then beep else lock screen put tUserChoice into fld "Type" put tCurBook into fld "RecipeList" put the number of lines of fld "RecipeList" into fld "RecipeNumLabel" SetVScrollbars "6" -- put lineOffset(tCurRecipe,tCurBook) into tLineNum if tLineNum <> 0 then set the hilitedLine of fld "RecipeList" to tLineNum else set the hilitedLine of fld "RecipeList" to 1 DisplayRecipe -- S end if unlock screen ----- switch tUserChoice case "Toutes les recettes" put "Recettes disponibles dans le livre" && quote & fld "Book" & quote into tToolTip break case "Mes recettes prfres" put "Recettes prfres dans le livre" && quote & fld "Book" & quote into tToolTip break default put "Recettes disponibles dans la catgorie" && quote & tUserChoice & quote && "du livre" && quote & fld "Book" & quote into tToolTip end switch ----- set the tooltip of fld "RecipeList" to tToolTip end if end menuPick @' Toutes les recettes Mes recettes prfres - Type Abats Agneau Apritif Autre Buf Boisson Canard Conserve Coquillage Crpes Crote Crustac Dessert Entre tranger Gteau Gibier Glace Gratin Jambon Lapin Lgumes ufs Ptes Plat unique Poisson Porc Rgional Riz Salade Sandwich Sauce Soupe Tarte sale Tarte sucre Terrine Veau Volaille Temprature Plat chaud Plat froid Plat chaud ou froid Difficult Trs facile Facile Normal Difficile Trs difficile Cot Trs conomique conomique Normal Cher Trs cher Temps Trs rapide Rapide Normal Long Trs long l'avance Sur le moment Un peu avant Partag Le jour mme La veille ou plus Classement Pas du tout Un peu Beaucoup Passionnment la folie - Non classes cREVGeneral scriptChecksumB2^GZ g(u, breakPoints66 handlerListmenuPickscriptSelectionchar 2684 to 2683 revUniqueID 1094028101743 bookmarks tempScript prevHandlermenuPickscript

on menuPick pItem

local tCatChoice,tUserChoice,tCurRecipe,tCurBook,tFilterString,tLineNum

-----

set cursor to 4

if the optionKey is down then put fld "RecipeList" into tCurBook

else put the uCurBook of this stack into tCurBook

-----

set the itemDel to "|"

put item 1 of pItem into tCatChoice

put last item of pItem into tUserChoice

put the hilitedText of fld "RecipeList" into tCurRecipe

-----

set the itemDel to comma

set the wholeMatches to true

-----

switch tCatChoice

case "Toutes les recettes"

put empty into tFilterString

break

case "Mes recettes préférées"

put "PREF_ true" into tFilterString

break

case "Type"

put "TYPE_" && tUserChoice into tFilterString

break

case "Température"

put "HOT_" && item itemOffset(tUserChoice,"Plat chaud,Plat froid,Plat chaud ou froid") of "true false,false true,true true" into tFilterString

break

case "Difficulté"

put "EASY_" && itemOffset(tUserChoice,"Très facile,Facile,Normal,Difficile,Très difficile") into tFilterString

break

case "Coût"

put "MONEY_" && itemOffset(tUserChoice,"Très économique,Économique,Normal,Cher,Très cher") into tFilterString

break

case "Temps"

put "SPEED_" && itemOffset(tUserChoice,"Très rapide,Rapide,Normal,Long,Très long") into tFilterString

break

case "À l'avance"

put "ADVANCE_" && itemOffset(tUserChoice,"Sur le moment,Un peu avant,Partagé,Le jour même,La veille ou plus") into tFilterString

break

case "Classement"

if tUserChoice <> "Non classées" then

put "RATING_" && itemOffset(tUserChoice,"Pas du tout,Un peu,Beaucoup,Passionnément,À la folie") into tFilterString

else

put "RATING_ 0" into tFilterString

end if

break

end switch

-----

filter tCurBook with "*" & tFilterString & "*"

-----

if tCurBook = empty then beep

else

lock screen

put tUserChoice into fld "Type"

put tCurBook into fld "RecipeList"

put the number of lines of fld "RecipeList" into fld "RecipeNumLabel"

SetVScrollbars "6" -- 

put lineOffset(tCurRecipe,tCurBook) into tLineNum

if tLineNum <> 0 then set the hilitedLine of fld "RecipeList" to tLineNum

else

set the hilitedLine of fld "RecipeList" to 1

DisplayRecipe -- S

end if

unlock screen

-----

switch tUserChoice

case "Toutes les recettes"

put "Recettes disponibles dans le livre" && quote & fld "Book" & quote into tToolTip

break

case "Mes recettes préférées"

put "Recettes préférées dans le livre" && quote & fld "Book" & quote into tToolTip

break

default

put "Recettes disponibles dans la catégorie" && quote & tUserChoice & quote && "du livre" && quote & fld "Book" & quote into tToolTip

end switch

-----

set the tooltip of fld "RecipeList" to tToolTip

end if

end menuPick

   Ingrdients yon closeField UpdateText "ING_",3 -- S set the htmlText of fld "Ingrdients2" to the htmlText of me end closeField @j  cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect16,106,428,490Master,scalebottomDistance-47Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-290Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVGeneralscriptChecksumF#_ߺSil6s bookmarks revUniqueID 1093437705696 handlerList closeFieldscriptSelection char 82 to 81 prevHandler closeField tempScriptscript

on closeField

UpdateText "ING_",3 -- S

set the htmlText of fld "Ingrédients2" to the htmlText of me

end closeField

  Commands a" cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-374MastertrueMaster,scaleLeftObjectRef 1093510162273Master,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,scaleLeftObjectSiderightMaster,expectedRect17,502,427,536Master,scalebottomDistanceMaster,movevDistance-18Master,moveHObjectSiderightMaster,scalerightAbsolutefalseMaster,scalerightfalseMaster,scalerightDistance -0.001408Master,scalerightObjectRef 1093510162273Master,scalerightObjectSiderightMaster,scaleLeftAbsolutefalseMaster,scaleLeftfalseMaster,cardRanking2Master,scaleleftDistance -0.250704Master,scaletopDistanceMaster,moveHAbsolutetrue Master,moveHtrue cREVGeneral bookmarks revUniqueID 1093521389399 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript PrintRecipe*B on mouseDown set the icon of me to 1045 end mouseDown ----------------------------------- on mouseUp set the icon of me to 1046 doStuff -- end mouseUp ----------------------------------- on mouseRelease set the icon of me to 1046 end mouseRelease ----------------------------------- on doStuff if the hilitedText of fld "RecipeList" = empty then beep exit doStuff end if ----- if "PrintA4" is among the lines of the windows then close stack "PrintA4" set the htmlText of fld "Title" of stack "PrintA4" to the htmlText of fld "RecipeName" set the htmlText of fld "Ingredients" of stack "PrintA4" to the htmlText of fld "Ingrdients" set the htmlText of