#!/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 "$@" Complex Search ;--2004 Richard Burkett -- all rights reserved worldwide on shutdownRequest answer "Save changes to HyperGlaze before quitting?" with "Don't Save" or "Cancel" or "Save" if it is "Don't Save" then pass shutDownRequest exit shutdownRequest end if if it is "Cancel" then exit shutdownRequest if it is "Save" then send SaveHyperGlaze to stack "HyperGlaze" pass shutDownRequest end if end shutdownRequest on openstack revChangeWindowSize 526,410 end openstack on opencard get the short name of this cd if it is "glazes" then set menuHistory of btn "Complex Search" to 1 else if it is "Clays" then set menuHistory of btn "Complex Search" to 2 else set menuHistory of btn "Complex Search" to 3 end opencard on CompileData MySurface,MyColor,NotMySurface,NotMyColor,\ MyCone,HowMany,pWhichFormat,TestedGlaze,Firing,myType,myComments,\ myIngredient,NotMyIngredient,myThermExpansion,TEOperator put empty into FoundGlazes put cd fld "IDPrintList" into GlazeDataList put cd fld "PrintList" into GlazeNameList put cd fld "listName" into GlazeNames put empty into glazeList put empty into IDGlazeList put empty into ROMax put empty into R2O3Max put empty into RO2Max put empty into NumberOfGlazes put empty into TotalK put empty into TotalNa put empty into TotalCa put empty into TotalMg put empty into TotalLi put empty into TotalBa put empty into totalSr put empty into TotalPb put empty into TotalZn put empty into TotalAl put empty into TotalB put empty into TotalFe put empty into TotalP put empty into TotalSi put empty into TotalTi put empty into FirstCard put empty into AllR2O put empty into AllR2O3 put empty into AllRO2 put empty into KDev put empty into NaDev put empty into CaDev put empty into MgDev put empty into LiDev put empty into BaDev put empty into SrDev put empty into PbDev put empty into ZnDev put empty into AlDev put empty into BDev put empty into FeDev put empty into PDev put empty into SiDev put empty into TiDev put false into oldCardIDs put false into FoundMyIngred repeat with i=1 to 9 put 1000 into line i of ROMin end repeat repeat with i=1 to 4 put 1000 into line i of R2O3Min end repeat repeat with i=1 to 2 put 1000 into line i of RO2Min end repeat if pWhichFormat is "Limits" then put fld 1 & "," after FoundGlazes repeat with x=1 to 8 get line x of fld "R2O" put it & "," after line x of AllR2O if it > line x of ROMax then put it into line x of ROMax if it < line x of ROMin then put it into line x of ROMin end repeat get line 12 of fld "R2O" put it & "," after line 9 of AllR2O if it > line 9 of ROMax then put it into line 9 of ROMax if it < line 9 of ROMin then put it into line 9 of ROMin repeat with x=1 to 4 get line x of fld "R2O3" put it & "," after line x of AllR2O3 if it > line x of R2O3Max then put it into line x of R2O3Max if it < line x of R2O3Min then put it into line x of R2O3Min end repeat repeat with x=1 to 2 get line x of fld "RO2" put it & "," after line x of AllRO2 if it > line x of RO2Max then put it into line x of RO2Max if it < line x of RO2Min then put it into line x of RO2Min end repeat end if if pWhichFormat is "Oxides" then set numberFormat to 0 put i*1 & tab & field "name" & tab & field "Cone" & tab after GlazeData repeat with x=1 to 8 put line x of field "R2O" & tab after GlazeData end repeat put line 12 of fld "R2O" & tab after GlazeData repeat with x=1 to 4 put line x of field "R2O3" & tab after GlazeData end repeat repeat with x=1 to 2 put line x of field "RO2" & tab after GlazeData end repeat put return after glazeData set numberformat to 0.000 end if set numberFormat to 0.000 add line 1 of fld "R2O" to TotalK add line 2 of fld "R2O" to TotalNa add line 3 of fld "R2O" to TotalCa add line 4 of fld "R2O" to TotalMg add line 5 of fld "R2O" to TotalLi add line 6 of fld "R2O" to TotalBa add line 7 of fld "R2O" to TotalPb add line 8 of fld "R2O" to TotalZn add line 12 of fld "R2O" to TotalSr add line 1 of fld "R2O3" to TotalAl add line 2 of fld "R2O3" to TotalB add line 3 of fld "R2O3" to TotalFe add line 4 of fld "R2O3" to TotalP add line 1 of fld "RO2" to TotalSi add line 2 of fld "RO2" to TotalTi add 1 to NumberOfGlazes --end repeat set numberformat to 0.000 put TotalK/NumberOfGlazes into TotalK put TotalNa/NumberOfGlazes into TotalNa put TotalCa/NumberOfGlazes into TotalCa put TotalMg/NumberOfGlazes into TotalMg put TotalLi/NumberOfGlazes into TotalLi put TotalBa/NumberOfGlazes into TotalBa put TotalSr/NumberOfGlazes into TotalSr put TotalPb/NumberOfGlazes into TotalPb put TotalZn/NumberOfGlazes into TotalZn put TotalAl/NumberOfGlazes into TotalAl put TotalB/NumberOfGlazes into TotalB put TotalFe/NumberOfGlazes into TotalFe put TotalP/NumberOfGlazes into TotalP put TotalSi/NumberOfGlazes into TotalSi put TotalTi/NumberOfGlazes into TotalTi if pWhichFormat is "Limits" then repeat with x=1 to 9 if line x of ROMin is empty then put "0.000" into line x of ROMin end repeat repeat with x=1 to 4 if line x of R2O3Min is empty then put "0.000" into line x of R2O3Min end repeat repeat with x=1 to 2 if line x of RO2Min is empty then put "0.000" into line x of RO2Min end repeat repeat with y = 1 to NumberOfGlazes add the abs of ((item y of line 1 of AllR2O)-TotalK) to KDev add the abs of ((item y of line 2 of AllR2O)-TotalNa) to NaDev add the abs of ((item y of line 3 of AllR2O)-TotalCa) to CaDev add the abs of ((item y of line 4 of AllR2O)-TotalMg) to MgDev add the abs of ((item y of line 5 of AllR2O)-TotalLi) to LiDev add the abs of ((item y of line 6 of AllR2O)-TotalBa) to BaDev add the abs of ((item y of line 7 of AllR2O)-TotalPb) to PbDev add the abs of ((item y of line 8 of AllR2O)-TotalZn) to ZnDev add the abs of ((item y of line 9 of AllR2O)-TotalBa) to SrDev add the abs of ((item y of line 1 of AllR2O3)-TotalAl) to AlDev add the abs of ((item y of line 2 of AllR2O3)-TotalB) to BDev add the abs of ((item y of line 3 of AllR2O3)-TotalFe) to FeDev add the abs of ((item y of line 4 of AllR2O3)-TotalP) to PDev add the abs of ((item y of line 1 of AllRO2)-TotalSi) to SiDev add the abs of ((item y of line 2 of AllRO2)-TotalTi) to TiDev end repeat put KDev/numberOfGlazes into KDev put NaDev/numberOfGlazes into NaDev put CaDev/numberOfGlazes into CaDev put MgDev/numberOfGlazes into MgDev put LiDev/numberOfGlazes into LiDev put BaDev/numberOfGlazes into BaDev put PbDev/numberOfGlazes into PbDev put ZnDev/numberOfGlazes into ZnDev put SrDev/numberOfGlazes into SrDev put AlDev/numberOfGlazes into AlDev put BDev/numberOfGlazes into BDev put FeDev/numberOfGlazes into FeDev put PDev/numberOfGlazes into PDev put SiDev/numberOfGlazes into SiDev put TiDev/numberOfGlazes into TiDev End if put ("C" & MyCone&myColor& MySurface) into myfilename --put stripSpaces(myfilename) into myfilename if the number of Chars of myFileName>32 then put the number of chars of myFileName into NameSize delete char 32 to NameSize of myFileName end if set filetype to "ttxtTEXT" if pWhichFormat is "limits" then put "Average" after myFileName else put "Chart" after myFileName ask file "Save data file for these glazes as" with myFileName if it is empty then exit CompileData put it into myFileName set the numberformat to 0 put 1*NumberOfGlazes into NumberOfGlazes open file myFileName if pWhichFormat is "limits" then write "Glazes used in compiling limits:" & return & FoundGlazes\ & return & return to file myFileName write "Range of Oxide Amounts for " & NumberOfGlazes && myColor && \ MySurface && "Cone" && MyCone && "Glazes" & return & return to file myFileName write"RO Group" & return to file myFileName write Line 1 of ROMin & " - " & line 1 of ROMax & tab & " K2O" &\ return to file myFileName write Line 2 of ROMin & " - " & line 2 of ROMax & tab & " Na2O" &\ return to file myFileName write Line 3 of ROMin & " - " & line 3 of ROMax & tab & " CaO" &\ return to file myFileName write Line 4 of ROMin & " - " & line 4 of ROMax & tab & " MgO" &\ return to file myFileName write Line 5 of ROMin & " - " & line 5 of ROMax & tab & " Li2O" &\ return to file myFileName write Line 6 of ROMin & " - " & line 6 of ROMax & tab & " BaO" &\ return to file myFileName write Line 9 of ROMin & " - " & line 9 of ROMax & tab & " SrO" &\ return to file myFileName write Line 7 of ROMin & " - " & line 7 of ROMax & tab & " PbO" &\ return to file myFileName write Line 8 of ROMin & " - " & line 8 of ROMax & tab & " ZnO" &\ return to file myFileName write return & "R2O3 Group" & return to file myFileName write Line 1 of R2O3Min & " - " & line 1 of R2O3Max & tab & " Al2O3" &\ return to file myFileName write Line 2 of R2O3Min & " - " & line 2 of R2O3Max & tab & " B2O3" &\ return to file myFileName write Line 3 of R2O3Min & " - " & line 3 of R2O3Max & tab & " Fe2O3" &\ return to file myFileName write Line 4 of R2O3Min & " - " & line 4 of R2O3Max & tab & " P2O3" &\ return to file myFileName write return & "RO2 Group" & return to file myFileName write line 1 of RO2Min & " - " & line 1 of RO2Max & tab & " SiO2" &\ return to file myFileName write line 2 of RO2Min & " - " & line 2 of RO2Max & tab & " TiO2" &\ return & Return to file myFileName Write "Average Amounts of Oxides in " & NumberOfGlazes &&\ MyColor && mySurface && "Cone" && MyCone && "Glazes" & return\ & return to file myFileName end if set the numberFormat to 0.000 if pWhichFormat is "Oxides" then if NumberOfGlazes<=0 then put NumberOfGlazes answer "Sorry. No glazes were found that matched your search. You may want to change the search parameters and try again." unlock screen set lockmessages to false set lockrecent to false exit CompileData else set numberFormat to 0 -- write "Analyses for" && NumberOfGlazes && MyColor && MySurface &&\ -- "Cone " & MyCone && "Glazes" & return & return to file myFileName write "Glaze Number" & tab & "Glaze Name" & tab & "Cone"\ & tab & "K2O" & tab & "Na2O" & tab & "CaO" & tab & "MgO" & tab &\ "Li2O" & tab & "BaO" & tab & "PbO" & tab & "ZnO" & tab & "SrO" & tab & "Al2O3" \ & tab & "B2O3" & tab & "Fe2O3" & tab & "P2O5" & tab & "SiO2" & tab & "TiO2" & return\ to file myFileName write GlazeData to file myFileName write (NumberOfGlazes+1) & tab & "Average of all Glazes" &\ tab & "?"& tab to file myFileName set numberformat to 0.000 write TotalK &\ tab & TotalNa & tab & TotalCa & tab & TotalMg & tab\ & TotalLi & tab & TotalBa & tab & TotalPb & tab & TotalZn & tab &\ TotalSr & tab & TotalAl & tab & TotalB & tab & TotalFe & tab & TotalP & tab &\ TotalSi & tab & totalTI & return to file myFileName end if send mouseup to button "cancel" end if if pWhichFormat is not "Oxides" then write "K2O Average:" & tab & TotalK & " +/- " & KDev & return to file myFileName write "Na2O Average:" & tab & TotalNa & " +/- " & NaDev & return to file myFileName write "CaO Average:" & tab & TotalCa & " +/- " & CaDev & return to file myFileName write"MgO Average:" & tab & TotalMg & " +/- " & MgDev & return to file myFileName write "Li2O Average:" & tab & TotalLi & " +/- " & LiDev & return to file myFileName write "BaO Average:" & tab & TotalBa & " +/- " & BaDev & return to file myFileName write "SrO Average:" & tab & TotalSr & " +/- " & SrDev & return to file myFileName write "PbO Average:" & tab & TotalPb & " +/- " & PbDev & return to file myFileName write "ZnO Average:" & tab & TotalZn & " +/- " & ZnDev & return & return to file myFileName write "Al2O3 Average:" & tab & TotalAl & " +/- " & AlDev & return to file myFileName write "B2O3 Average:" & tab & TotalB & " +/- " & BDev & return to file myFileName write "Fe2O3 Average:" & tab & TotalFe & " +/- " & FeDev & return to file myFileName write "P2O5 Average:" & tab & TotalP & " +/- " & PDev & return & return to file myFileName write "SiO2 Average:" & tab & TotalSi & " +/- " & SiDev & return \ to file myFileName write "TiO2 Average:" & tab & TotalTi & " +/- " & TiDev & return & return\ to file myFileName set the numberformat to 0.0 write "Average Si:Al Ratio" & tab & TotalSi/TotalAl & " : 1" & \ return & return to file myFileName end if close file myFileName if pWhichFormat is not "Oxides" then set numberFormat to 0.00 set itemdelimiter to ":" put last item of myFileName into myfilename delete last item of myFileName set itemdelimiter to "," if last word of myfilename is "average" then delete last word of myfilename put char 1 to 26 of myfilename & ".LIMIT" into myfilename ask File "Save the limit formula as:" with myfilename if the result is empty then put it into myFileName open file myFileName write "HGLimitFormula" & tab & myfilename & tab & myCone & tab & mySurface & tab to file myFileName write totalK-KDev && TotalK+KDev & tab to file myFileName write totalNa-NaDev && totalNa+NaDev & tab to file myFileName write totalLi-LiDev && totalLi+LiDev & tab to file myFileName write totalCa-CaDev && totalCa+CaDev & tab to file myFileName write totalBa-BaDev && totalBa+BaDev & tab to file myFileName write totalSr-SrDev && totalSr+SrDev & tab to file myFileName write totalMg-MgDev && totalMg+MgDev & tab to file myFileName write totalZn-ZnDev && TotalZn+ZnDev & tab to file myFileName write totalB-BDev && TotalB+BDev & tab to file myFileName write totalAl-AlDev && totalAl+AlDev & tab to file myFileName write totalSi-SiDev && TotalSi+SiDev & tab to file myFileName write totalPb-PbDev && TotalPb+PbDev & tab to file myFileName -- new additions write totalP-PDev && TotalP+PDev & tab to file myFileName write totalFe-FeDev && TotalFe+FeDev & tab to file myFileName close file myFileName end if end if end CompileData function addSpaces myText put false into CheckNext repeat with i= the number of chars of myText down to 1 if checkNext then if char i of myText is not " " then put " " after char i of myText put false into CheckNext if char i of myText is "-" then if char i+1 of myText is not " " then put " " after char i of myText put true into checkNext end if end repeat return myText end addSpaces ZComplex Search ULucida Grande WArial WArial WArial WArialWArial UArial UArial UArial UArial UArial WArial cREVGeneral debugObjectsGlazes @̙     :;<=wyz~Clays @̙ !"#$%&'()*+,-./0123489>?@Ax{| Materials @GHIJKLMNRSTmnopquv}i  cREVGeneral revUniqueID 1088114311965Complex Search}5on menuPick myItem go to cd myItem end menuPick pComplex SearchGlazes Clays Materials cREVGeneral revUniqueID 1088114200264 CloseEon mouseup put empty into fld "SearchResults" of card "Glazes" put empty into fld "SearchResults" of card "Clays" put empty into fld "SearchResults" of card "Materials" save stack "Complex Search" close stack "Complex Search" end mouseup zL cREVGeneral revUniqueID 1088114556666 DoneEp7on mouseup close stack "Complex Search" end mouseup L cREVGeneral revUniqueID 1088114556666  Label * cREVGeneral revUniqueID 1088230145656 -Search for recipes that contain these items: ColorPopup on menupick myItem if myItem is not empty then if myItem is not "none" then put " " & myItem after fld "color" select first line of fld "color" else put empty into fld "color" end if end if end menupick @ColoruNone (- Clear Translucent Semi-Opaque Opaque - White Gray Black Brown Red Orange Yellow Green Blue-Green Blue Purple cREVGeneral revUniqueID 1088230337596 Surface on menupick myItem if myItem is not empty then if myItem is not "none" then if myItem is "Help with Surface Descriptions" then Answer "Shiny/Glossy: very bright and smooth" & return &\ "SemiGloss: slightly dulled surface" & return &\ "Satin: waxy mat or satiny feel & low sheen" & return &\ "Matte: little sheen, dull surface" & return & \ "Dry Matte: almost slip-like, very dull surface" & return & \ "Luster: metallic sheen" & return & \ "Texture: crawl, etc. (specify)" else if myItem is not empty then put " " & myItem after fld "Surface" select first line of fld "Surface" end if else put empty into fld "surface" end if end if end menupick @SurfaceNone (- Shiny or Glossy Semi-Gloss Semi-Matte or Satin Matte Dry Matte - Crystalline Luster Texture Slip or Engobe Stain - Help with Surface Descriptions  cREVGeneral revUniqueID 1088230345563  Ingredient)hX cREVGeneral revUniqueID 1088230556387  Label F cREVGeneral revUniqueID 1088230592525 Ingredient:Firing on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "firing" select first line of fld "firing" else put empty into fld "firing" end if end if end menupick @FiringXNone (- Oxidation Reduction Oxidation or Reduction Raku Salt or Soda Wood Luster Saggar  cREVGeneral revUniqueID 1088230627733 Testing on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "Testing" select first line of fld "Testing" else put empty into fld "Testing" end if end if end menupick ?TestingNone (- Tested Untested cREVGeneral revUniqueID 1088476885712  ConePopup on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "cone" select first line of fld "Cone" else put empty into fld "Cone" end if end if end menupick j@Cone*BNone (- 020 016 010 08 06 05 04 03 02 01 1 2 3 4 6 7 8 9 10 11 12 cREVGeneral revUniqueID 1088477193177 iT: P cREVGeneral revUniqueID 1088478693454Find and Mark Cards` X> !basic search - marks cards found cREVGeneral revUniqueID 1088477592556  %Find in the Found Set (Marked Cards)` XR ,refines search - looks only at marked cards cREVGeneral revUniqueID 1088477695046  'Calculate Custom Limits from Found Set` Xf TestingNone (- Tested Untested cREVGeneral revUniqueID 1088479916174  ConePopup on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "NOTcone" select first line of fld "NOTCone" else put empty into fld "NOTCone" end if end if end menupick ̙!i@ConeBNone (- 020 016 010 08 06 05 04 03 02 01 1 2 3 4 6 7 8 9 10 11 12 cREVGeneral revUniqueID 1088479916176  NOTFiring)h̙Z cREVGeneral revUniqueID 1088479915660   NOTSurface)h̙Z cREVGeneral revUniqueID 1088479915739   NOTColor)h̙Z cREVGeneral revUniqueID 1088479915824   NOTTesting)h̙Z cREVGeneral revUniqueID 1088479915904  NOTCone)h̙Zj cREVGeneral revUniqueID 1088479915988  Label  H ! cREVGeneral revUniqueID 1088480362379 * NOTE: you must include ! a cone number in your searchSearchProgressaa*Ѷ Ѷ10000 cREVGeneral revUniqueID 1088480978404 SearchResults  @+( cREVGeneral revUniqueID 1088486015891  Label , " cREVGeneral revUniqueID 1088230145656 -Search for recipes that contain these items: Label &N cREVGeneral revUniqueID 1088479616618 but not these items: NOTCone)h̙Zb cREVGeneral revUniqueID 1088479915988   ConePopup on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "NOTcone" select first line of fld "NOTCone" else put empty into fld "NOTCone" end if end if end menupick ̙ a@ConeBNone (- 020 016 010 08 06 05 04 03 02 01 1 2 3 4 6 7 8 9 10 11 12 cREVGeneral revUniqueID 1088479916176 Cone)hXb cREVGeneral revUniqueID 1088230098997  10 ConePopup on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "cone" select first line of fld "Cone" else put empty into fld "Cone" end if end if end menupick b@Cone*BNone (- 020 016 010 08 06 05 04 03 02 01 1 2 3 4 6 7 8 9 10 11 12 cREVGeneral revUniqueID 1088477193177  ColorPopup on menupick myItem if myItem is not empty then if myItem is not "none" then put " " & myItem after fld "color" select first line of fld "color" else put empty into fld "color" end if end if end menupick y@ColoruNone (- Clear Translucent Semi-Opaque Opaque - White Gray Black Brown Red Orange Yellow Green Blue-Green Blue Purple cREVGeneral revUniqueID 1088230337596 Color)hXy cREVGeneral revUniqueID 1088230288069   ColorPopup on menupick myItem if myItem is not empty then if myItem is not "none" then put " " & myItem after fld "NOTcolor" select first line of fld "NOTcolor" else put empty into fld "NOTcolor" end if end if end menupick ̙ y@ColoruNone (- Clear Translucent Semi-Opaque Opaque - White Gray Black Brown Red Orange Yellow Green Blue-Green Blue Purple cREVGeneral revUniqueID 1088479916163 ! NOTColor)h̙Zy cREVGeneral revUniqueID 1088479915824  " NOTSurface)h̙Z cREVGeneral revUniqueID 1088479915739  #Surface on menupick myItem if myItem is not empty then if myItem is not "none" then if myItem is "Help with Surface Descriptions" then Answer "Shiny/Glossy: very bright and smooth" & return &\ "SemiGloss: slightly dulled surface" & return &\ "Satin: waxy mat or satiny feel & low sheen" & return &\ "Matte: little sheen, dull surface" & return & \ "Dry Matte: almost slip-like, very dull surface" & return & \ "Luster: metallic sheen" & return & \ "Texture: crawl, etc. (specify)" else if myItem is not empty then put " " & myItem after fld "NOTSurface" select first line of fld "NOTSurface" end if else put empty into fld "NOTsurface" end if end if end menupick ̙ @UsageKNone (- Handbuilding Throwing Handbuilding and Throwing Casting Tilemaking  cREVGeneral revUniqueID 1088479916166 $Surface)hZ cREVGeneral revUniqueID 1088230383491  %Surface on menupick myItem if myItem is not empty then if myItem is not "none" then if myItem is "Help with Surface Descriptions" then Answer "Shiny/Glossy: very bright and smooth" & return &\ "SemiGloss: slightly dulled surface" & return &\ "Satin: waxy mat or satiny feel & low sheen" & return &\ "Matte: little sheen, dull surface" & return & \ "Dry Matte: almost slip-like, very dull surface" & return & \ "Luster: metallic sheen" & return & \ "Texture: crawl, etc. (specify)" else if myItem is not empty then put " " & myItem after fld "Surface" select first line of fld "Surface" end if else put empty into fld "surface" end if end if end menupick @UsageKNone (- Handbuilding Throwing Handbuilding and Throwing Casting Tilemaking  cREVGeneral revUniqueID 1088230345563 &Firing on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "firing" select first line of fld "firing" else put empty into fld "firing" end if end if end menupick @FiringXNone (- Oxidation Reduction Oxidation or Reduction Raku Salt or Soda Wood Luster Saggar  cREVGeneral revUniqueID 1088230627733 'Firing)hX cREVGeneral revUniqueID 1088230401044  (Firing on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "NOTfiring" select first line of fld "NOTfiring" else put empty into fld "NOTfiring" end if end if end menupick ̙ @FiringXNone (- Oxidation Reduction Oxidation or Reduction Raku Salt or Soda Wood Luster Saggar  cREVGeneral revUniqueID 1088479916171 ) NOTFiring)h̙Z cREVGeneral revUniqueID 1088479915660  * NOTTesting)h̙Z cREVGeneral revUniqueID 1088479915904  +Testing on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "NOTTesting" select first line of fld "NOTTesting" else put empty into fld "NOTTesting" end if end if end menupick ̙!>TestingNone (- Tested Untested cREVGeneral revUniqueID 1088479916174 ,Testing)hX cREVGeneral revUniqueID 1088230546433  -Testing on menupick myItem if myItem is not empty then if myItem is not "none" then put myItem into fld "Testing" select first line of fld "Testing" else put empty into fld "Testing" end if end if end menupick ?TestingNone (- Tested Untested cREVGeneral revUniqueID 1088476885712 . Ingredient)hX cREVGeneral revUniqueID 1088230556387  /Label F cREVGeneral revUniqueID 1088230592525 Ingredient: 0NOTIngredient)h̙Z cREVGeneral revUniqueID 1088479915251  1Label ̙F cREVGeneral revUniqueID 1088479915335 Ingredient: 2Label  J cREVGeneral revUniqueID 1088480362379 * NOTE: you must include ! a cone number in your search 3SearchResults  @*) cREVGeneral revUniqueID 1088486015891  4iT?< cREVGeneral revUniqueID 10884786934545Find and Mark Cards`D'on mouseup --do nothing end mouseup XC  cREVGeneral revUniqueID 1088477592556 6%Find in the Found Set (Marked Cards)`D'on mouseup --do nothing end mouseup XW  cREVGeneral revUniqueID 1088477695046 8SearchProgressaa*Ѷ Ѷ10000 cREVGeneral revUniqueID 1088480978404SearchExi:on mouseup global gIngredList,gColorList,gComplexSearch put true into gComplexSearch put the rect of button "Cancel" of stack "Complex Search" into CancelRect set the hilite of me to true show button "Cancel" put "Searching the Glaze stack..." & return & "Hold mouse button down to cancel." into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to true put "Search completed! " into mySearchPrefix hide stack "Glazes" put line 1 of fld "name" into myName put line 1 of fld "TE" into myTE put line 1 of fld "cone" into myCone put line 1 of fld "NOTcone" into NotMyCone put line 1 of fld "Color" into myColor put line 1 of fld "NOTcolor" into NotMyColor put line 1 of fld "Surface" into mySurface put line 1 of fld "NOTSurface" into NotMySurface put line 1 of fld "Firing" into myFiring put line 1 of fld "NOTFiring" into NotMyFiring put line 1 of fld "Testing" into myTesting put line 1 of fld "NOTTesting" into NotMyTesting put line 1 of fld "Ingredient" into myIngredient put line 1 of fld "NOTIngredient" into NotMyIngredient put line 1 of fld "Comments" into myComments put line 1 of fld "NOTComments" into NotmyComments if the hilite of btn "Find and Mark Cards" is true then put "FindAndMark" into WhichSearch else if the hilite of btn "Find in the Found Set (Marked Cards)" is true then put "MarkedCards" into WhichSearch else if the hilite of btn "calculate Custom Limits from found set" is true then put "CompileLimits" into whichSearch -- answer "Calculating custom limits is not yet implemented in this version." -- set the hilite of btn "Find and Mark Cards" to true -- set the hilite of btn "calculate Custom Limits from found set" to false else set the hilite of btn "Find and Mark Cards" to true put "FindAndMark" into WhichSearch end if put empty into myCardCount go to stack "Glazes" push card go to first card of stack "Glazes" put the number of cds of stack "Glazes" into NumGlazes if WhichSearch is "FindAndMark" then find empty find whole myCone in fld "Cone" if the result is "not found" then put "No cone" & myCone & " glazes were found!" into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false exit mouseup else put the id of this cd into myFirstCard repeat with i=1 to NumGlazes set the cursor to busy put true into GlazeCheckList if myName is not empty then if myName is not in fld "Name" then put false into GlazeCheckList if myTE is not empty then if myTE<(fld "ThermalExpansion") then put false into GlazeCheckList if myColor is not empty then if myColor is not in fld "Color" then put false into GlazeCheckList if NotMyCone is not empty then if NotMyCone is in fld "Cone" then put false into GlazeCheckList if NotMyColor is not empty then if NotMyColor is in fld "Color" then put false into GlazeCheckList if mySurface is not empty then if mySurface is not in fld "Surface" then put false into GlazeCheckList if myFiring is not empty then if myFiring is not in fld "Firing" then put false into GlazeCheckList if NotMySurface is not empty then if NotMySurface is in fld "Surface" then put false into GlazeCheckList if NotMyFiring is not empty then if NotMyFiring is in fld "Firing" then put false into GlazeCheckList if myTesting is not empty then if myCone is not in fld "Testing" then put false into GlazeCheckList if NotMyTesting is not empty then if NotMyTesting is in fld "Testing" then put false into GlazeCheckList put gIngredList & gColorList into myIngredList if myIngredient is not empty then if myIngredient is not in myIngredList then put false into GlazeCheckList if NotMyIngredient is not empty then if NotMyIngredient is in myIngredList then put false into GlazeCheckList if myComments is not empty then if myComments is not in fld "Comments" then put false into GlazeCheckList if NotMyComments is not empty then if NotMyComments is in fld "Comments" then put false into GlazeCheckList if GlazeCheckList is true then mark this card put (myCardCount+1) into myCardCount --else unmark this card -- check to see if this is a good idea end if set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then put "Search canceled after " into mySearchPrefix exit repeat end if set the defaultStack to the topStack go next find whole myCone in fld "Cone" if the id of this card is myFirstCard then exit repeat set the thumbposition of scrollbar "SearchProgress" of card id 1002 of stack "Complex Search" to trunc(10000*(number of this card/numGlazes)) end repeat else if WhichSearch is "MarkedCards" then put the number of marked cds into myNumMarked if myNumMarked<=0 then go to stack "Complex Search" put "No glazes are currently marked!" into fld "SearchResults" of card "Glazes" of stack "Complex Search" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false set the hilite of btn "Find and Mark Cards" to true set the hilite of btn "Find in the Found Set (Marked Cards)" to false hide button "Cancel" exit mouseup end if go next marked card put the id of this cd into myFirstCard repeat with i=1 to myNumMarked set the cursor to busy put true into GlazeCheckList if myName is not empty then if myName is not in fld "Name" then put false into GlazeCheckList if myTE is not empty then if myTE<(fld "ThermalExpansion") then put false into GlazeCheckList if myCone is not empty then if myCone is not in fld "Cone" then put false into GlazeCheckList if myColor is not empty then if myColor is not in fld "Color" then put false into GlazeCheckList if NotMyCone is not empty then if NotMyCone is in fld "Cone" then put false into GlazeCheckList if NotMyColor is not empty then if NotMyColor is in fld "Color" then put false into GlazeCheckList if mySurface is not empty then if mySurface is not in fld "Surface" then put false into GlazeCheckList if myFiring is not empty then if myFiring is not in fld "Firing" then put false into GlazeCheckList if NotMySurface is not empty then if NotMySurface is in fld "Surface" then put false into GlazeCheckList if NotMyFiring is not empty then if NotMyFiring is in fld "Firing" then put false into GlazeCheckList if myTesting is not empty then if myCone is not in fld "Testing" then put false into GlazeCheckList if NotMyTesting is not empty then if NotMyTesting is in fld "Testing" then put false into GlazeCheckList put gIngredList & gColorList into myIngredList if myIngredient is not empty then if myIngredient is not in myIngredList then put false into GlazeCheckList if NotMyIngredient is not empty then if NotMyIngredient is in myIngredList then put false into GlazeCheckList if myComments is not empty then if myComments is not in fld "Comments" then put false into GlazeCheckList if NotMyComments is not empty then if NotMyComments is in fld "Comments" then put false into GlazeCheckList if GlazeCheckList is true then mark this card add 1 to myCardCount else unmark this card set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then put "Search canceled after " into mySearchPrefix exit repeat end if set the defaultStack to the topStack go next marked card if the id of this card is myFirstCard then exit repeat set the thumbposition of scrollbar "SearchProgress" of card id 1002 of stack "Complex Search" to trunc(10000*(number of this card/numGlazes)) end repeat else if whichSearch is "CompileLimits" then -- create custom limit formulas put the number of marked cds into myNumMarked if myNumMarked<=0 then show stack "Glazes" go to stack "Complex Search" put "No glazes are currently marked!" into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false -- send mouseup to btn "Find and Mark Cards" hide button "Cancel" exit mouseup end if put "Compiling oxide characteristics from the marked glazes." into fld "SearchResults" of stack "complex Search" go next marked card put the id of this cd into myFirstCard -- compile the oxide characteristics of this set of glazes put empty into FoundGlazes --put cd fld "IDPrintList" into GlazeDataList --put cd fld "PrintList" into GlazeNameList --put cd fld "listName" into GlazeNames put empty into glazeList put empty into IDGlazeList put empty into ROMax put empty into R2O3Max put empty into RO2Max put empty into NumberOfGlazes put empty into TotalK put empty into TotalNa put empty into TotalCa put empty into TotalMg put empty into TotalLi put empty into TotalBa put empty into totalSr put empty into TotalPb put empty into TotalZn put empty into TotalAl put empty into TotalB put empty into TotalFe put empty into TotalP put empty into TotalSi put empty into TotalTi put empty into FirstCard put empty into AllR2O put empty into AllR2O3 put empty into AllRO2 put empty into KDev put empty into NaDev put empty into CaDev put empty into MgDev put empty into LiDev put empty into BaDev put empty into SrDev put empty into PbDev put empty into ZnDev put empty into AlDev put empty into BDev put empty into FeDev put empty into PDev put empty into SiDev put empty into TiDev put false into oldCardIDs put false into FoundMyIngred answer "Compile oxide data chart or glaze limits and averages?" with "Cancel" or "Oxides" or "Limits" if it is "Cancel" then show stack "Glazes" go to stack "Complex Search" put "Compiling of limits canceled!" into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false hide button "Cancel" exit mouseup end if put it into pWhichFormat repeat with i=1 to 9 put 1000 into line i of ROMin end repeat repeat with i=1 to 4 put 1000 into line i of R2O3Min end repeat repeat with i=1 to 2 put 1000 into line i of RO2Min end repeat repeat with i=1 to myNumMarked set the cursor to busy if (line 1 of fld "RO2")<=0 then go to next marked card next repeat end if put 1+myCardCount into myCardCount if pWhichFormat is "Limits" then put fld "Name" & "," after FoundGlazes repeat with x=1 to 8 get line x of fld "R2O" put it & "," after line x of AllR2O if it > line x of ROMax then put it into line x of ROMax if it < line x of ROMin then put it into line x of ROMin end repeat get line 12 of fld "R2O" put it & "," after line 9 of AllR2O if it > line 9 of ROMax then put it into line 9 of ROMax if it < line 9 of ROMin then put it into line 9 of ROMin repeat with x=1 to 4 get line x of fld "R2O3" put it & "," after line x of AllR2O3 if it > line x of R2O3Max then put it into line x of R2O3Max if it < line x of R2O3Min then put it into line x of R2O3Min end repeat repeat with x=1 to 2 get line x of fld "RO2" put it & "," after line x of AllRO2 if it > line x of RO2Max then put it into line x of RO2Max if it < line x of RO2Min then put it into line x of RO2Min end repeat end if if pWhichFormat is "Oxides" then set numberFormat to 0 put i*1 & tab & field "name" & tab & field "Cone" & tab after GlazeData repeat with x=1 to 8 put line x of field "R2O" & tab after GlazeData end repeat put line 12 of fld "R2O" & tab after GlazeData repeat with x=1 to 4 put line x of field "R2O3" & tab after GlazeData end repeat repeat with x=1 to 2 put line x of field "RO2" & tab after GlazeData end repeat put return after glazeData set numberformat to 0.000 end if set numberFormat to 0.000 add line 1 of fld "R2O" to TotalK add line 2 of fld "R2O" to TotalNa add line 3 of fld "R2O" to TotalCa add line 4 of fld "R2O" to TotalMg add line 5 of fld "R2O" to TotalLi add line 6 of fld "R2O" to TotalBa add line 7 of fld "R2O" to TotalPb add line 8 of fld "R2O" to TotalZn add line 12 of fld "R2O" to TotalSr add line 1 of fld "R2O3" to TotalAl add line 2 of fld "R2O3" to TotalB add line 3 of fld "R2O3" to TotalFe add line 4 of fld "R2O3" to TotalP add line 1 of fld "RO2" to TotalSi add line 2 of fld "RO2" to TotalTi add 1 to NumberOfGlazes set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then show stack "Glazes" go to stack "Complex Search" put "Limit calculation canceled." into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 hide scrollbar "SearchProgress" set the hilite of me to false hide button "Cancel" set the defaultStack to the TopStack exit mouseup end if set the defaultStack to the TopStack go next marked card if the id of this card is myFirstCard then exit repeat set the thumbposition of scrollbar "SearchProgress" of card id 1002 of stack "Complex Search" to trunc(10000*(number of this card/numGlazes)) end repeat set numberformat to 0.000 put TotalK/NumberOfGlazes into TotalK put TotalNa/NumberOfGlazes into TotalNa put TotalCa/NumberOfGlazes into TotalCa put TotalMg/NumberOfGlazes into TotalMg put TotalLi/NumberOfGlazes into TotalLi put TotalBa/NumberOfGlazes into TotalBa put TotalSr/NumberOfGlazes into TotalSr put TotalPb/NumberOfGlazes into TotalPb put TotalZn/NumberOfGlazes into TotalZn put TotalAl/NumberOfGlazes into TotalAl put TotalB/NumberOfGlazes into TotalB put TotalFe/NumberOfGlazes into TotalFe put TotalP/NumberOfGlazes into TotalP put TotalSi/NumberOfGlazes into TotalSi put TotalTi/NumberOfGlazes into TotalTi if pWhichFormat is "Limits" then repeat with x=1 to 9 if line x of ROMin is empty then put "0.000" into line x of ROMin end repeat repeat with x=1 to 4 if line x of R2O3Min is empty then put "0.000" into line x of R2O3Min end repeat repeat with x=1 to 2 if line x of RO2Min is empty then put "0.000" into line x of RO2Min end repeat repeat with y = 1 to NumberOfGlazes add the abs of ((item y of line 1 of AllR2O)-TotalK) to KDev add the abs of ((item y of line 2 of AllR2O)-TotalNa) to NaDev add the abs of ((item y of line 3 of AllR2O)-TotalCa) to CaDev add the abs of ((item y of line 4 of AllR2O)-TotalMg) to MgDev add the abs of ((item y of line 5 of AllR2O)-TotalLi) to LiDev add the abs of ((item y of line 6 of AllR2O)-TotalBa) to BaDev add the abs of ((item y of line 7 of AllR2O)-TotalPb) to PbDev add the abs of ((item y of line 8 of AllR2O)-TotalZn) to ZnDev add the abs of ((item y of line 9 of AllR2O)-TotalBa) to SrDev add the abs of ((item y of line 1 of AllR2O3)-TotalAl) to AlDev add the abs of ((item y of line 2 of AllR2O3)-TotalB) to BDev add the abs of ((item y of line 3 of AllR2O3)-TotalFe) to FeDev add the abs of ((item y of line 4 of AllR2O3)-TotalP) to PDev add the abs of ((item y of line 1 of AllRO2)-TotalSi) to SiDev add the abs of ((item y of line 2 of AllRO2)-TotalTi) to TiDev end repeat put KDev/numberOfGlazes into KDev put NaDev/numberOfGlazes into NaDev put CaDev/numberOfGlazes into CaDev put MgDev/numberOfGlazes into MgDev put LiDev/numberOfGlazes into LiDev put BaDev/numberOfGlazes into BaDev put PbDev/numberOfGlazes into PbDev put ZnDev/numberOfGlazes into ZnDev put SrDev/numberOfGlazes into SrDev put AlDev/numberOfGlazes into AlDev put BDev/numberOfGlazes into BDev put FeDev/numberOfGlazes into FeDev put PDev/numberOfGlazes into PDev put SiDev/numberOfGlazes into SiDev put TiDev/numberOfGlazes into TiDev End if -- compiling is done, now to save the data into files. put "Oxide limits for " & numMarked & " glazes compiled." into fld "SearchResults" of stack "Complex Search" put ("C" & MyCone & myColor & MySurface) into myfilename --put stripSpaces(myfilename) into myfilename if (the number of Chars of myFileName)>32 then put (the number of chars of myFileName) into NameSize delete char 28 to NameSize of myFileName end if if pWhichFormat is "limits" then put " Average" after myFileName else put "Chart" after myFileName ask file "Save limit data file for these glazes as" with (myFileName & ".txt") if it is empty then show stack "Glazes" go to stack "Complex Search" put "Limit calculation canceled." into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 hide scrollbar "SearchProgress" set the hilite of me to false hide button "Cancel" exit mouseup end if put it into myFileName set the numberformat to 0 put 1*NumberOfGlazes into NumberOfGlazes open file myFileName for text write if pWhichFormat is "limits" then write "Glazes used in compiling limits:" & return & FoundGlazes\ & return & return to file myFileName write "Range of Oxide Amounts for " & NumberOfGlazes && myColor && \ MySurface && "Cone" && MyCone && "Glazes" & return & return to file myFileName write"RO Group" & return to file myFileName write Line 1 of ROMin & " - " & line 1 of ROMax & tab & " K2O" &\ return to file myFileName write Line 2 of ROMin & " - " & line 2 of ROMax & tab & " Na2O" &\ return to file myFileName write Line 3 of ROMin & " - " & line 3 of ROMax & tab & " CaO" &\ return to file myFileName write Line 4 of ROMin & " - " & line 4 of ROMax & tab & " MgO" &\ return to file myFileName write Line 5 of ROMin & " - " & line 5 of ROMax & tab & " Li2O" &\ return to file myFileName write Line 6 of ROMin & " - " & line 6 of ROMax & tab & " BaO" &\ return to file myFileName write Line 9 of ROMin & " - " & line 9 of ROMax & tab & " SrO" &\ return to file myFileName write Line 7 of ROMin & " - " & line 7 of ROMax & tab & " PbO" &\ return to file myFileName write Line 8 of ROMin & " - " & line 8 of ROMax & tab & " ZnO" &\ return to file myFileName write return & "R2O3 Group" & return to file myFileName write Line 1 of R2O3Min & " - " & line 1 of R2O3Max & tab & " Al2O3" &\ return to file myFileName write Line 2 of R2O3Min & " - " & line 2 of R2O3Max & tab & " B2O3" &\ return to file myFileName write Line 3 of R2O3Min & " - " & line 3 of R2O3Max & tab & " Fe2O3" &\ return to file myFileName write Line 4 of R2O3Min & " - " & line 4 of R2O3Max & tab & " P2O3" &\ return to file myFileName write return & "RO2 Group" & return to file myFileName write line 1 of RO2Min & " - " & line 1 of RO2Max & tab & " SiO2" &\ return to file myFileName write line 2 of RO2Min & " - " & line 2 of RO2Max & tab & " TiO2" &\ return & Return to file myFileName Write "Average Amounts of Oxides in " & NumberOfGlazes &&\ MyColor && mySurface && "Cone" && MyCone && "Glazes" & return\ & return to file myFileName end if set the numberFormat to 0.000 if pWhichFormat is "Oxides" then if NumberOfGlazes<=0 then -- put NumberOfGlazes answer "Sorry. No glazes were found that matched your search. You may want to change the search parameters and try again." set lockrecent to false exit mouseup else set numberFormat to 0 -- write "Analyses for" && NumberOfGlazes && MyColor && MySurface &&\ -- "Cone " & MyCone && "Glazes" & return & return to file myFileName write "Number" & tab & "Name" & tab & "Cone"\ & tab & "K2O" & tab & "Na2O" & tab & "CaO" & tab & "MgO" & tab &\ "Li2O" & tab & "BaO" & tab & "PbO" & tab & "ZnO" & tab & "SrO" & tab & "Al2O3" \ & tab & "B2O3" & tab & "Fe2O3" & tab & "P2O5" & tab & "SiO2" & tab & "TiO2" & return\ to file myFileName write GlazeData to file myFileName write (NumberOfGlazes+1) & tab & "Average of all Glazes" &\ tab & "?"& tab to file myFileName set numberformat to 0.000 write TotalK &\ tab & TotalNa & tab & TotalCa & tab & TotalMg & tab\ & TotalLi & tab & TotalBa & tab & TotalPb & tab & TotalZn & tab &\ TotalSr & tab & TotalAl & tab & TotalB & tab & TotalFe & tab & TotalP & tab &\ TotalSi & tab & totalTI & return to file myFileName end if end if if pWhichFormat is not "Oxides" then write "K2O Average:" & tab & TotalK & " +/- " & KDev & return to file myFileName write "Na2O Average:" & tab & TotalNa & " +/- " & NaDev & return to file myFileName write "CaO Average:" & tab & TotalCa & " +/- " & CaDev & return to file myFileName write"MgO Average:" & tab & TotalMg & " +/- " & MgDev & return to file myFileName write "Li2O Average:" & tab & TotalLi & " +/- " & LiDev & return to file myFileName write "BaO Average:" & tab & TotalBa & " +/- " & BaDev & return to file myFileName write "SrO Average:" & tab & TotalSr & " +/- " & SrDev & return to file myFileName write "PbO Average:" & tab & TotalPb & " +/- " & PbDev & return to file myFileName write "ZnO Average:" & tab & TotalZn & " +/- " & ZnDev & return & return to file myFileName write "Al2O3 Average:" & tab & TotalAl & " +/- " & AlDev & return to file myFileName write "B2O3 Average:" & tab & TotalB & " +/- " & BDev & return to file myFileName write "Fe2O3 Average:" & tab & TotalFe & " +/- " & FeDev & return to file myFileName write "P2O5 Average:" & tab & TotalP & " +/- " & PDev & return & return to file myFileName write "SiO2 Average:" & tab & TotalSi & " +/- " & SiDev & return \ to file myFileName write "TiO2 Average:" & tab & TotalTi & " +/- " & TiDev & return & return\ to file myFileName set the numberformat to 0.0 write "Average Si:Al Ratio" & tab & TotalSi/TotalAl & " : 1" & \ return & return to file myFileName end if close file myFileName if pWhichFormat is not "Oxides" then set numberFormat to 0.00 -- set itemdelimiter to ":" -- put last item of myFileName into myfilename -- delete last item of myFileName -- set itemdelimiter to "," put ("C" & MyCone & myColor & MySurface) into myfilename --put stripSpaces(myfilename) into myfilename if (the number of Chars of myFileName)>32 then put (the number of chars of myFileName) into NameSize delete char 28 to NameSize of myFileName end if put myfilename & ".LMT" into myfilename ask File "Save the limit formula as:" with myFilename if the result is empty then put it into myFileName open file myFileName for text write set itemDelimiter to "/" put (last item of myFileName) into myLimitName set itemDelimiter to ":" write "HGLimitFormula" & tab & myLimitName & tab & myCone & tab & mySurface & tab to file myFileName write totalK-KDev && TotalK+KDev & tab to file myFileName write totalNa-NaDev && totalNa+NaDev & tab to file myFileName write totalLi-LiDev && totalLi+LiDev & tab to file myFileName write totalCa-CaDev && totalCa+CaDev & tab to file myFileName write totalBa-BaDev && totalBa+BaDev & tab to file myFileName write totalSr-SrDev && totalSr+SrDev & tab to file myFileName write totalMg-MgDev && totalMg+MgDev & tab to file myFileName write totalZn-ZnDev && TotalZn+ZnDev & tab to file myFileName write totalB-BDev && TotalB+BDev & tab to file myFileName write totalAl-AlDev && totalAl+AlDev & tab to file myFileName write totalSi-SiDev && TotalSi+SiDev & tab to file myFileName write totalPb-PbDev && TotalPb+PbDev & tab to file myFileName -- new additions write totalP-PDev && TotalP+PDev & tab to file myFileName write totalFe-FeDev && TotalFe+FeDev & tab to file myFileName close file myFileName end if end if -- end compile oxide characteristics end if pop card show stack "glazes" go to stack "Complex Search" put empty into gComplexSearch set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the numberFormat to 0 if whichSearch is "CompileLimits" then put myCardCount && "glaze recipes compiled and ready to install in Glaze Limits!" into field "SearchResults" else if myCardCount<=0 then put "No" into myCardCount if myCardCount=1 then put mySearchPrefix & myCardCount && "glaze recipe found and marked!" into field "SearchResults" else put mySearchPrefix & myCardCount && "glaze recipes found and marked!" into field "SearchResults" end if set the hilite of me to false hide button "Cancel" end mouseup 33_D\ cREVGeneral revUniqueID 1088616960409 breakPoints 9SearchExon mouseup global gCIngredList set the hilite of me to true put the rect of button "Cancel" of stack "Complex Search" into CancelRect show button "Cancel" put "Searching the Clay stack..." & return & "Hold the mouse button down to cancel." into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to true put "Search completed! " into mySearchPrefix put fld "name" into myName put fld "cone" into myCone put fld "NOTcone" into NotMyCone put fld "Color" into myColor put fld "NOTcolor" into NotMyColor put fld "Surface" into mySurface put fld "NOTSurface" into NotMySurface put fld "Firing" into myFiring put fld "NOTFiring" into NotMyFiring put fld "Testing" into myTesting put fld "NOTTesting" into NotMyTesting put fld "Ingredient" into myIngredient put fld "NOTIngredient" into NotMyIngredient put fld "Comments" into myComments put fld "NOTComments" into NotmyComments if the hilite of btn "Find and Mark Cards" is true then put "FindAndMark" into WhichSearch else if the hilite of btn "Find in the Found Set (Marked Cards)" is true then put "MarkedCards" into WhichSearch else set the hilite of btn "Find and Mark Cards" to true put "FindAndMark" into WhichSearch end if put empty into myCardCount hide stack "Clays" go to stack "Clays" push card go to first card of stack "Clays" put the number of cds of stack "Clays" into NumGlazes if WhichSearch is "FindAndMark" then find empty find whole myCone in fld "Cone" if the result is "not found" then put "No cone" & myCone & " clays were found!" into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false show stack "Clays" hide button "Cancel" exit mouseup else put the id of this cd into myFirstCard repeat with i=1 to NumGlazes set the cursor to busy put true into GlazeCheckList if myName is not empty then if myName is not in fld "Name" then put false into GlazeCheckList if myColor is not empty then if myColor is not in fld "Color" then put false into GlazeCheckList if NotMyCone is not empty then if NotMyCone is in fld "Cone" then put false into GlazeCheckList if NotMyColor is not empty then if NotMyColor is in fld "Color" then put false into GlazeCheckList if mySurface is not empty then if mySurface is not in fld "Surface" then put false into GlazeCheckList if myFiring is not empty then if myFiring is not in fld "Firing" then put false into GlazeCheckList if NotMySurface is not empty then if NotMySurface is in fld "Surface" then put false into GlazeCheckList if NotMyFiring is not empty then if NotMyFiring is in fld "Firing" then put false into GlazeCheckList if myTesting is not empty then if myCone is not in fld "Testing" then put false into GlazeCheckList if NotMyTesting is not empty then if NotMyTesting is in fld "Testing" then put false into GlazeCheckList if myIngredient is not empty then if myIngredient is not in gCIngredList then put false into GlazeCheckList if NotMyIngredient is not empty then if NotMyIngredient is in gCIngredList then put false into GlazeCheckList if myComments is not empty then if myComments is not in fld "Comments" then put false into GlazeCheckList if NotMyComments is not empty then if NotMyComments is in fld "Comments" then put false into GlazeCheckList if GlazeCheckList is true then mark this card add 1 to myCardCount --else unmark this card -- check to see if this is a good idea end if set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then put "Search canceled after " into mySearchPrefix exit repeat end if set the defaultStack to the TopStack go next find whole myCone in fld "Cone" if the id of this card is myFirstCard then exit repeat set the thumbposition of scrollbar "SearchProgress" of card id 1005 of stack "Complex Search" to trunc(10000*(number of this card/numGlazes)) end repeat else if WhichSearch is "MarkedCards" then put the number of marked cds into myNumMarked if myNumMarked<=0 then go to stack "complex Search" put "No clays are currently marked!" into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false send mouseup to btn "Find and Mark Cards" of card "Clays" hide button "Cancel" show stack "Clays" exit mouseup end if go next marked card put the id of this cd into myFirstCard repeat with i=1 to myNumMarked set the cursor to busy put true into GlazeCheckList if myName is not empty then if myName is not in fld "Name" then put false into GlazeCheckList if myCone is not empty then if myCone is not in fld "Cone" then put false into GlazeCheckList if myColor is not empty then if myColor is not in fld "Color" then put false into GlazeCheckList if NotMyCone is not empty then if NotMyCone is in fld "Cone" then put false into GlazeCheckList if NotMyColor is not empty then if NotMyColor is in fld "Color" then put false into GlazeCheckList if mySurface is not empty then if mySurface is not in fld "Surface" then put false into GlazeCheckList if myFiring is not empty then if myFiring is not in fld "Firing" then put false into GlazeCheckList if NotMySurface is not empty then if NotMySurface is in fld "Surface" then put false into GlazeCheckList if NotMyFiring is not empty then if NotMyFiring is in fld "Firing" then put false into GlazeCheckList if myTesting is not empty then if myCone is not in fld "Testing" then put false into GlazeCheckList if NotMyTesting is not empty then if NotMyTesting is in fld "Testing" then put false into GlazeCheckList if myIngredient is not empty then if myIngredient is not in gCIngredList then put false into GlazeCheckList if NotMyIngredient is not empty then if NotMyIngredient is in gCIngredList then put false into GlazeCheckList if myComments is not empty then if myComments is not in fld "Comments" then put false into GlazeCheckList if NotMyComments is not empty then if NotMyComments is in fld "Comments" then put false into GlazeCheckList if GlazeCheckList is true then mark this card add 1 to myCardCount else unmark this card set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then put "Search canceled after " into mySearchPrefix exit repeat end if set the defaultStack to the TopStack go next marked card if the id of this card is myFirstCard then exit repeat set the thumbposition of scrollbar "SearchProgress" of card id 1002 of stack "Complex Search" to trunc(10000*(number of this card/numGlazes)) end repeat else -- create custom limit formulas end if show stack "Clays" pop card go to stack "Complex Search" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false if myCardCount<=0 then put "No" into myCardCount if myCardCount=1 then put MySearchPrefix & myCardCount && "clay recipe found and marked!" into field "SearchResults" else put MySearchPrefix & myCardCount && "clay recipes found and marked!" into field "SearchResults" set the hilite of me to false hide button "Cancel" end mouseup 33_D\ cREVGeneral revUniqueID 1088476892925 : Comments)hX cREVGeneral revUniqueID 1088617707778  ;Label F cREVGeneral revUniqueID 1088617707854 Comment: < NOTComments)h̙Z cREVGeneral revUniqueID 1088617707930  =Label ̙F cREVGeneral revUniqueID 1088617708007 Comment: > Comments)hY cREVGeneral revUniqueID 1088618203670  ?Label F cREVGeneral revUniqueID 1088618203748 Comment: @ NOTComments)h̙Z cREVGeneral revUniqueID 1088618203823  ALabel ̙F cREVGeneral revUniqueID 1088618203900 Comment: GMatType h@M} cREVGeneral revUniqueID 1088797959742  H MaterialTypeF Uon menupick myItem if myItem is "none" then put empty into fld "matType" else put myItem into fld "MatType" end menupick >|popup menu of material typesNone (- Unity format - Clay Feldspar Frit Flux Stabilizer Refractory Glass Former Colorant Opacifier Deflocculent - Other Material - Help cREVGeneral revUniqueID 1088797966785 ISearchExon mouseup global gIngredList,gColorList set the hilite of me to true put the rect of button "Cancel" of stack "Complex Search" into CancelRect show button "Cancel" put "Searching the materials stack..." & return & "Hold mouse button down to cancel." into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to true put "Search completed! " into mySearchPrefix put empty into myOxideSearch put "K,Na,Li,Ca,Mg,Ba,Sr,Zn,Pb,FeO,Cu,Co,Ni,Al,B,Fe,P,Sb,Cr,V,Si,Ti,Zr,Sn,Mn" into myOxideList repeat with i=1 to 25 if the hilight of btn (item i of myOxideList) is true then put "S" & return after myOxideSearch else put "X" & return after myOxideSearch end repeat put fld "matType" into myMatType put fld "Comments" into myComments put fld "Material" into myMaterial put fld "SearchTolerance" into SearchTolerance if the hilite of btn "Find and Mark Cards" is true then put "FindAndMark" into WhichSearch else if the hilite of btn "Find in the Found Set (Marked Cards)" is true then put "MarkedCards" into WhichSearch else set the hilite of btn "Find and Mark Cards" to true put "FindAndMark" into WhichSearch end if put empty into myCardCount hide stack "Materials" go to stack "Materials" push card go to first card of stack "Materials" put the number of cds of stack "Materials" into NumMaterials if WhichSearch is "FindAndMark" then repeat with i=1 to NumMaterials set the cursor to busy put true into MatCheckList if myComments is not empty then if myComments is not in fld "Comments" then put false into MatCheckList if myMatType is not empty then if myMatType is not in fld "ClayUnity" then put false into MatCheckList if myMaterial is not empty then if myMaterial is not in fld "Material" then put false into MatCheckList -- if NotMyColor is not empty then if NotMyColor is in fld "Color" then put false into MatCheckList repeat with x=1 to 25 if line x of myOxideSearch is "S" then if fld (item x of myOxideList) <=SearchTolerance then -- we struck out on this material! put false into MatCheckList exit repeat end if else next repeat end repeat if MatCheckList is true then mark this card add 1 to myCardCount --else unmark this card -- check to see if this is a good idea end if set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then go to stack "Complex Search" put "Seach canceled after " into mySearchPrefix show stack "Materials" exit repeat end if set the defaultStack to the TopStack go next set the thumbposition of scrollbar "SearchProgress" of card id 1006 of stack "Complex Search" to trunc(10000*(number of this card/numMaterials)) end repeat else if WhichSearch is "MarkedCards" then put the number of marked cds into myNumMarked if myNumMarked<=0 then go to stack "Complex Search" put "No materials are currently marked!" into fld "SearchResults" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false set the hilite of me to false set the hilite of btn "Find and Mark Cards" to true set the hilite of btn "Find in the Found Set (Marked Cards)" to false show stack "Materials" hide button "Cancel" exit mouseup end if go next marked card put the id of this cd into myFirstCard repeat with i=1 to myNumMarked set the cursor to busy put true into MatCheckList if myComments is not empty then if myComments is not in fld "Comments" then put false into MatCheckList if myMatType is not empty then if myMatType is not in fld "ClayUnity" then put false into MatCheckList if myMaterial is not empty then if myMaterial is not in fld "Material" then put false into MatCheckList -- if NotMyColor is not empty then if NotMyColor is in fld "Color" then put false into MatCheckList repeat with x=1 to 25 if line x of myOxideSearch is "S" then if fld (item x of myOxideList) <=0.05 then -- we struck out on this material! put false into MatCheckList exit repeat end if else next repeat end repeat if MatCheckList is true then mark this card add 1 to myCardCount else unmark this card set the defaultStack to "Complex Search" if the mouse is down and the mouseLoc is within CancelRect then go to stack "Complex Search" put "Seach canceled after " into mySearchPrefix show stack "Materials" exit repeat end if set the defaultStack to the topStack go next marked card if the id of this card is myFirstCard then exit repeat set the thumbposition of scrollbar "SearchProgress" of card id 1006 of stack "Complex Search" to trunc(10000*(number of this card/numMaterials)) end repeat else -- create custom limit formulas end if show stack "Materials" pop card go to stack "Complex Search" set the thumbposition of scrollbar "SearchProgress" to 0 set the visible of scrollbar "SearchProgress" to false if myCardCount<=0 then put "No" into myCardCount if myCardCount=1 then put mySearchPrefix & myCardCount && "material found and marked!" into field "SearchResults" else put mySearchPrefix & myCardCount && "materials found and marked!" into field "SearchResults" set the hilite of me to false hide button "Cancel" end mouseup 33_D\ cREVGeneral revUniqueID 1088616960409 JLabel , cREVGeneral revUniqueID 1088479616618 R Enter search text and/or select the oxides you would like to find in a material: KLabel  cJ cREVGeneral revUniqueID 1088798429292 Searching Hint: @ !If your search doesn't find any Materials cards which have all #of the oxides specified, then try 'searching for just one or two oxides. LSearchProgressaa*Ѷ Ѷ10000 cREVGeneral revUniqueID 1088480978404 MSearchResults  @*' cREVGeneral revUniqueID 1088486015891  NijM< cREVGeneral revUniqueID 1088478693454OFind and Mark Cards` oQ  cREVGeneral revUniqueID 1088477592556 P%Find in the Found Set (Marked Cards)` ne  cREVGeneral revUniqueID 1088477695046  RLabel :p cREVGeneral revUniqueID 1088798870333 Comments: S Comments)h> cREVGeneral revUniqueID 1088798911471  TLabel 9fp cREVGeneral revUniqueID 1088798986413 Material type: mLabel &Ip cREVGeneral revUniqueID 1088805675384 Material name: n Material)hGP cREVGeneral revUniqueID 1088805675469  oi#^L cREVGeneral revUniqueID 1088805824646BK`e'd  cREVGeneral revUniqueID 1088797125968 C ROLabels 5b6  cREVGeneral revUniqueID 1088797235870 K2O    Na2O    Li2O    CaO MgO BaO SrO ZnO PbO FeO CuO CoO NiO UNa`e'x  cREVGeneral revUniqueID 1088799321344 VLi`e'  cREVGeneral revUniqueID 1088799323711 WCa`e'  cREVGeneral revUniqueID 1088799326796 XMg`e'  cREVGeneral revUniqueID 1088799329709 YBa`e'  cREVGeneral revUniqueID 1088799336759 ZSr`e'  cREVGeneral revUniqueID 1088799339160 [Zn`e'  cREVGeneral revUniqueID 1088799349945 \Pb`e'  cREVGeneral revUniqueID 1088799360078 ]FeO`e'  cREVGeneral revUniqueID 1088799361887 ^Cu`e'*  cREVGeneral revUniqueID 1088799364432 _Co`e'>  cREVGeneral revUniqueID 1088799367241 `Ni`e'R  cREVGeneral revUniqueID 1088799368858 pix^P cREVGeneral revUniqueID 1088805830998 D R2O3Labels b6 cREVTable currentview-

Al2O3

B2O3

Fe2O3

P2O5

Sb2O3

Cr2O3

V2O5

 cREVGeneral revUniqueID 1088797406809 Al2O3     B2O3     Fe2O3     P2O5     Sb2O3     Cr2O3     V2O5     aAl`e|f  cREVGeneral revUniqueID 1088799421589 bB`e|z  cREVGeneral revUniqueID 1088799421592 cFe`e|  cREVGeneral revUniqueID 1088799421594 dP`e|  cREVGeneral revUniqueID 1088799421596 eSb`e|  cREVGeneral revUniqueID 1088799421599 fCr`e|  cREVGeneral revUniqueID 1088799421601 gV`e|  cREVGeneral revUniqueID 1088799421604 qi^N cREVGeneral revUniqueID 1088805842424 E RO2Labels b6 cREVGeneral revUniqueID 1088797590559 SiO2   TiO2   ZrO2   SnO2   MnO2   hSi`ef  cREVGeneral revUniqueID 1088799437893 iTi`ez  cREVGeneral revUniqueID 1088799437896 jZr`e  cREVGeneral revUniqueID 1088799437899 kSn`e  cREVGeneral revUniqueID 1088799437902 lMn`e  cREVGeneral revUniqueID 1088799437905 uiZ" cREVGeneral revUniqueID 1088966491780 rSearchTolerance)`< cREVGeneral revUniqueID 1088965244691  0.100s ToleranceUPCPon mouseup -- set numberformat to 0.000 -- add 0.05 to fld "SearchTolerance" get fld "SearchTolerance" if it<=0.045 and it>=0.005 then set numberformat to 0.000 put (fld "SearchTolerance") + 0.005 into fld "searchTolerance" else if it>=0.045 then set numberformat to 0.000 put (fld "SearchTolerance") + 0.05 into fld "searchTolerance" else answer "Search tolerance for oxides must be at least 0.005" end mouseup click to raise mole amount cREVGeneral revUniqueID 1088965302904 tToleranceDOWNCPron mouseup get fld "SearchTolerance" if it<=0.055 and it>0.005 then set numberformat to 0.000 put (fld "SearchTolerance") - 0.005 into fld "searchTolerance" else if it>=0.050 then set numberformat to 0.000 put (fld "SearchTolerance") - 0.05 into fld "searchTolerance" else answer "Search tolerance for oxides must be at least 0.005" end mouseup click to lower mole amount cREVGeneral revUniqueID 1088965360758  vLabel &2 cREVGeneral revUniqueID 1088966508165 minimum mole amount of oxide ! (Oxides with less than this  $ amount will not not be found.) #wClear Search FieldsExon mouseup put empty into fld "name" put empty into fld "TE" put empty into fld "cone" put empty into fld "NotCone" put empty into fld "Color" put empty into fld "NotColor" put empty into fld "Surface" put empty into fld "NotSurface" put empty into fld "Firing" put empty into fld "NotFiring" put empty into fld "Testing" put empty into fld "NotTesting" put empty into fld "Ingredient" put empty into fld "NotIngredient" put empty into fld "Comments" put empty into fld "NotComments" end mouseup b) cREVGeneral revUniqueID 1089041672634 xClear Search FieldsExon mouseup put empty into fld "name" put empty into fld "cone" put empty into fld "NotCone" put empty into fld "Color" put empty into fld "NotColor" put empty into fld "Surface" put empty into fld "NotSurface" put empty into fld "Firing" put empty into fld "NotFiring" put empty into fld "Testing" put empty into fld "NotTesting" put empty into fld "Ingredient" put empty into fld "NotIngredient" put empty into fld "Comments" put empty into fld "NotComments" end mouseup ^, cREVGeneral revUniqueID 1089041672634 yName)hT= cREVGeneral revUniqueID 1089085273084  zLabel >F cREVGeneral revUniqueID 1089085273217 Name: {Name)hZE cREVGeneral revUniqueID 1089088986170  |Label EF cREVGeneral revUniqueID 1089088986287 Name:}Clear Search FieldsEx>on mouseup put "K,Na,Li,Ca,Mg,Ba,Sr,Zn,Pb,FeO,Cu,Co,Ni,Al,B,Fe,P,Sb,Cr,V,Si,Ti,Zr,Sn,Mn" into myOxideList put empty into fld "material" put empty into fld "matType" put empty into fld "Comments" repeat with i=1 to 25 set the hilite of btn (item i of myOxideList) to false end repeat end mouseup < cREVGeneral revUniqueID 1089041672634 ~TE-hS4@finds glazes with less expansion (7.0 is typical for stoneware) cREVGeneral revUniqueID 1089213407379  Label S+Thermal Expansion LESS than number entered cREVGeneral revUniqueID 1089213407462 Thermal Expansion < Label SF cREVGeneral revUniqueID 1089213465903 x10-6/deg C    Cancelex"on mouseup hide me end mouseup 33_^\CANCEL cREVGeneral revUniqueID 1128189626154 Cancelex"on mouseup hide me end mouseup 33_^\CANCEL cREVGeneral revUniqueID 1128191537265 Cancelex"on mouseup hide me end mouseup 33_^\CANCEL cREVGeneral revUniqueID 1128191555276