home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1997 September / Personal_Computer_World_Sep_97.iso / DXRS / CDXPCW09.DXR / 00007_CDXWhichInputBoxes.ls < prev    next >
Encoding:
Text File  |  1997-06-25  |  13.3 KB  |  275 lines

  1. on CDXWhichInputBoxes thisdropbox
  2.   global CDXWhichInputList, CDXDrpMenuList, CDXRememberlist, CDXRememberNamelist, CDXRememberSeltextList, CDXTwoRememberSeltextList, CDXTwoRememberNamelist, CDXTwoRememberlist, CDXOptionSprite
  3.   set alreadyHere to 0
  4.   repeat with t = 1 to count(CDXWhichInputList)
  5.     if getAt(getAt(CDXWhichInputList, t), 1) = 7 then
  6.       set alreadyHere to 1
  7.       set thisPos to t
  8.       exit repeat
  9.     end if
  10.   end repeat
  11.   case alreadyHere of
  12.     0:
  13.       set AllFilled to 1
  14.       repeat with C = 1 to 3
  15.         if (the locH of sprite getAt(getAt(CDXDrpMenuList, C), 11) <> getAt(getAt(CDXDrpMenuList, C), 13)) or (field getAt(getAt(CDXDrpMenuList, C), 12) = EMPTY) then
  16.           set AllFilled to 0
  17.           exit repeat
  18.         end if
  19.       end repeat
  20.       case AllFilled of
  21.         0:
  22.         1:
  23.           addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [7, 1])
  24.           set the member of sprite 7 to member "CDXANDORYelloW"
  25.           set the member of sprite CDXOptionSprite to member "CDXOption"
  26.           set the loc of sprite CDXOptionSprite to point(326, 174)
  27.           set the ink of sprite CDXOptionSprite to 36
  28.           updateStage()
  29.       end case
  30.     1:
  31.       set AllFilled to 1
  32.       set NotComplete to 1
  33.       repeat with C = 1 to 3
  34.         if (the locH of sprite getAt(getAt(CDXDrpMenuList, C), 11) <> getAt(getAt(CDXDrpMenuList, C), 13)) or (field getAt(getAt(CDXDrpMenuList, C), 12) = EMPTY) then
  35.           set AllFilled to 0
  36.           exit repeat
  37.         end if
  38.       end repeat
  39.       if (AllFilled = 1) and (the member of sprite 7 = member "CDXANDORYellow") then
  40.         set AllFilled to 2
  41.       end if
  42.       if (field "selectedfour" = EMPTY) and (thisdropbox = 7) then
  43.         set AllFilled to 0
  44.         set NotComplete to 0
  45.         set thisPos to thisPos + 1
  46.         set the member of sprite CDXOptionSprite to member "CDXOption"
  47.         set the loc of sprite CDXOptionSprite to point(326, 174)
  48.         set the ink of sprite CDXOptionSprite to 36
  49.         updateStage()
  50.       end if
  51.       if (field "selectedfour" <> EMPTY) and (thisdropbox = 7) then
  52.         set AllFilled to 1
  53.         set thisPos to thisPos + 1
  54.         set the locH of sprite CDXOptionSprite to 2000
  55.         updateStage()
  56.         set the textSize of member "SelectedFour" to 12
  57.         set the boxType of member "SelectedFour" to #adjust
  58.         set the textStyle of member "SelectedFour" to "bold"
  59.         if the machineType > 200 then
  60.           set the textFont of member "SelectedFour" to "Arial"
  61.         else
  62.           set the textFont of member "SelectedFour" to "Geneva"
  63.         end if
  64.         updateStage()
  65.       end if
  66.       case AllFilled of
  67.         0:
  68.           if (count(CDXRememberlist) <> 0) and (the member of sprite 7 = member "CDXANDORYellow") and (field "SelectedFour" = EMPTY) then
  69.             set CDXRememberlist to list()
  70.             set CDXRememberNamelist to list()
  71.             set CDXRememberSeltextList to list()
  72.             addAt(CDXRememberlist, count(CDXRememberlist) + 1, value(string(getAt(CDXWhichInputList, thisPos))))
  73.             addAt(CDXRememberNamelist, count(CDXRememberNamelist) + 1, the memberNum of sprite 7)
  74.             setAt(getAt(CDXWhichInputList, thisPos), 2, 0)
  75.             set valuex to count(CDXWhichInputList) - thisPos
  76.             repeat with a = 1 to valuex
  77.               deleteAt(CDXWhichInputList, thisPos + 1)
  78.             end repeat
  79.             set the member of sprite 24 to member "CDDOT"
  80.             set the locH of sprite 24 to 2000
  81.             set the member of sprite 7 to member "CDXANDOR"
  82.           end if
  83.           if count(CDXRememberlist) = 0 then
  84.             set CDXRememberlist to list()
  85.             set CDXRememberNamelist to list()
  86.             set CDXRememberSeltextList to list()
  87.             repeat with z = thisPos to count(CDXWhichInputList)
  88.               put value(string(getAt(CDXWhichInputList, z)))
  89.               addAt(CDXRememberlist, count(CDXRememberlist) + 1, value(string(getAt(CDXWhichInputList, z))))
  90.               addAt(CDXRememberNamelist, count(CDXRememberNamelist) + 1, the memberNum of sprite getAt(getAt(CDXRememberlist, count(CDXRememberNamelist) + 1), 1))
  91.             end repeat
  92.             repeat with d = 24 to 31
  93.               if the locH of sprite d <> 2000 then
  94.                 addAt(CDXRememberSeltextList, count(CDXRememberSeltextList) + 1, [d, the locH of sprite d, the locV of sprite d, the memberNum of sprite d])
  95.               end if
  96.             end repeat
  97.             repeat with z = thisPos to count(CDXWhichInputList)
  98.               setAt(getAt(CDXWhichInputList, z), 2, 0)
  99.             end repeat
  100.             repeat with d = 24 to 31
  101.               set the member of sprite d to member "CDDOT"
  102.               set the locH of sprite d to 2000
  103.             end repeat
  104.             if NotComplete = 1 then
  105.               set the member of sprite 7 to member "CDXANDOR"
  106.             end if
  107.             set the member of sprite 8 to member "CDXInputOneGrey"
  108.             set the member of sprite 9 to member "CDXInputTwoGrey"
  109.             set the member of sprite 10 to member "CDXInputThreeGrey"
  110.             set the member of sprite 11 to member "CDXANDOR"
  111.             set the member of sprite 12 to member "CDXInputOneGrey"
  112.             set the member of sprite 13 to member "CDXInputTwoGrey"
  113.             set the member of sprite 14 to member "CDXInputThreeGrey"
  114.             updateStage()
  115.           end if
  116.         1:
  117.           if count(CDXRememberlist) <> 0 then
  118.             repeat with z = 1 to count(CDXRememberlist)
  119.               setAt(CDXWhichInputList, thisPos - 1 + z, value(string(getAt(CDXRememberlist, z))))
  120.               set the memberNum of sprite getAt(getAt(CDXRememberlist, z), 1) to getAt(CDXRememberNamelist, z)
  121.             end repeat
  122.             repeat with z = 1 to count(CDXRememberSeltextList)
  123.               set the loc of sprite getAt(getAt(CDXRememberSeltextList, z), 1) to point(getAt(getAt(CDXRememberSeltextList, z), 2), getAt(getAt(CDXRememberSeltextList, z), 3))
  124.               set the memberNum of sprite getAt(getAt(CDXRememberSeltextList, z), 1) to getAt(getAt(CDXRememberSeltextList, z), 4)
  125.             end repeat
  126.             updateStage()
  127.             set CDXRememberlist to list()
  128.             set CDXRememberNamelist to list()
  129.             set CDXRememberSeltextList to list()
  130.             set CDXTwoRememberlist to list()
  131.             set CDXTwoRememberNamelist to list()
  132.             set CDXTwoRememberSeltextList to list()
  133.           end if
  134.       end case
  135.   end case
  136.   if count(CDXWhichInputList) > 6 then
  137.     set TwoalreadyHere to 0
  138.     repeat with t = 1 to count(CDXWhichInputList)
  139.       if getAt(getAt(CDXWhichInputList, t), 1) = 11 then
  140.         set TwoalreadyHere to 1
  141.         set TwothisPos to t
  142.         exit repeat
  143.       end if
  144.     end repeat
  145.     case TwoalreadyHere of
  146.       0:
  147.         set TwoAllFilled to 1
  148.         repeat with C = 5 to 7
  149.           if (the locH of sprite getAt(getAt(CDXDrpMenuList, C), 11) <> getAt(getAt(CDXDrpMenuList, C), 13)) or (field getAt(getAt(CDXDrpMenuList, C), 12) = EMPTY) then
  150.             set TwoAllFilled to 0
  151.             exit repeat
  152.           end if
  153.         end repeat
  154.         case TwoAllFilled of
  155.           0:
  156.           1:
  157.             addAt(CDXWhichInputList, count(CDXWhichInputList) + 1, [11, 1])
  158.             set the member of sprite 11 to member "CDXANDORYelloW"
  159.             set the member of sprite CDXOptionSprite to member "CDXOption"
  160.             set the loc of sprite CDXOptionSprite to point(326, 250)
  161.             set the ink of sprite CDXOptionSprite to 36
  162.             updateStage()
  163.         end case
  164.       1:
  165.         set OneFilled to 1
  166.         repeat with C = 1 to 3
  167.           if (the locH of sprite getAt(getAt(CDXDrpMenuList, C), 11) <> getAt(getAt(CDXDrpMenuList, C), 13)) or (field getAt(getAt(CDXDrpMenuList, C), 12) = EMPTY) then
  168.             set OneFilled to 0
  169.             exit repeat
  170.           end if
  171.         end repeat
  172.         if OneFilled = 0 then
  173.         end if
  174.         case OneFilled of
  175.           1:
  176.             set TwoAllFilled to 1
  177.             set NotComplete to 1
  178.             repeat with C = 5 to 7
  179.               if (the locH of sprite getAt(getAt(CDXDrpMenuList, C), 11) <> getAt(getAt(CDXDrpMenuList, C), 13)) or (field getAt(getAt(CDXDrpMenuList, C), 12) = EMPTY) then
  180.                 set TwoAllFilled to 0
  181.                 exit repeat
  182.               end if
  183.             end repeat
  184.             if (TwoAllFilled = 1) and (the member of sprite 11 = member "CDXANDORYellow") then
  185.               set TwoAllFilled to 2
  186.             end if
  187.             if (field "SelectedEight" = EMPTY) and (thisdropbox = 11) then
  188.               set TwoAllFilled to 0
  189.               set NotComplete to 0
  190.               set TwothisPos to TwothisPos + 1
  191.               set the member of sprite CDXOptionSprite to member "CDXOption"
  192.               set the loc of sprite CDXOptionSprite to point(326, 250)
  193.               set the ink of sprite CDXOptionSprite to 36
  194.             end if
  195.             if (field "SelectedEight" <> EMPTY) and (thisdropbox = 11) then
  196.               set TwoAllFilled to 1
  197.               set TwothisPos to TwothisPos + 1
  198.               set the locH of sprite CDXOptionSprite to 2000
  199.               updateStage()
  200.               set the textSize of member "SelectedEight" to 12
  201.               set the boxType of member "SelectedEight" to #adjust
  202.               set the textStyle of member "SelectedEight" to "bold"
  203.               if the machineType > 200 then
  204.                 set the textFont of member "SelectedEight" to "Arial"
  205.               else
  206.                 set the textFont of member "SelectedEight" to "Geneva"
  207.               end if
  208.               updateStage()
  209.             end if
  210.             case TwoAllFilled of
  211.               0:
  212.                 if (count(CDXTwoRememberlist) <> 0) and (the member of sprite 11 = member "CDXANDORYellow") and (field "SelectedEight" = EMPTY) then
  213.                   set CDXTwoRememberlist to list()
  214.                   set CDXTwoRememberNamelist to list()
  215.                   set CDXTwoRememberSeltextList to list()
  216.                   addAt(CDXTwoRememberlist, count(CDXTwoRememberlist) + 1, value(string(getAt(CDXWhichInputList, TwothisPos))))
  217.                   addAt(CDXTwoRememberNamelist, count(CDXTwoRememberNamelist) + 1, the memberNum of sprite 11)
  218.                   setAt(getAt(CDXWhichInputList, TwothisPos), 2, 0)
  219.                   deleteAt(CDXWhichInputList, TwothisPos + 1)
  220.                   deleteAt(CDXWhichInputList, TwothisPos + 1)
  221.                   deleteAt(CDXWhichInputList, TwothisPos + 1)
  222.                   set the member of sprite 28 to member "CDDOT"
  223.                   set the locH of sprite 28 to 2000
  224.                   set the member of sprite 11 to member "CDXANDOR"
  225.                 end if
  226.                 if count(CDXTwoRememberlist) = 0 then
  227.                   set CDXTwoRememberlist to list()
  228.                   set CDXTwoRememberNamelist to list()
  229.                   set CDXTwoRememberSeltextList to list()
  230.                   updateStage()
  231.                   repeat with z = TwothisPos to count(CDXWhichInputList)
  232.                     addAt(CDXTwoRememberlist, count(CDXTwoRememberlist) + 1, value(string(getAt(CDXWhichInputList, z))))
  233.                     addAt(CDXTwoRememberNamelist, count(CDXTwoRememberNamelist) + 1, the memberNum of sprite getAt(getAt(CDXTwoRememberlist, count(CDXTwoRememberNamelist) + 1), 1))
  234.                   end repeat
  235.                   repeat with d = 28 to 31
  236.                     if the locH of sprite d <> 2000 then
  237.                       addAt(CDXTwoRememberSeltextList, count(CDXTwoRememberSeltextList) + 1, [d, the locH of sprite d, the locV of sprite d, the memberNum of sprite d])
  238.                     end if
  239.                   end repeat
  240.                   repeat with z = TwothisPos to count(CDXWhichInputList)
  241.                     setAt(getAt(CDXWhichInputList, z), 2, 0)
  242.                   end repeat
  243.                   repeat with d = 28 to 31
  244.                     set the member of sprite d to member "CDDOT"
  245.                     set the locH of sprite d to 2000
  246.                   end repeat
  247.                   if NotComplete = 1 then
  248.                     set the member of sprite 11 to member "CDXANDOR"
  249.                   end if
  250.                   set the member of sprite 12 to member "CDXInputOneGrey"
  251.                   set the member of sprite 13 to member "CDXInputTwoGrey"
  252.                   set the member of sprite 14 to member "CDXInputThreeGrey"
  253.                   updateStage()
  254.                 end if
  255.               1:
  256.                 if count(CDXTwoRememberlist) <> 0 then
  257.                   repeat with z = 1 to count(CDXTwoRememberlist)
  258.                     setAt(CDXWhichInputList, TwothisPos - 1 + z, value(string(getAt(CDXTwoRememberlist, z))))
  259.                     set the memberNum of sprite getAt(getAt(CDXTwoRememberlist, z), 1) to getAt(CDXTwoRememberNamelist, z)
  260.                   end repeat
  261.                   repeat with z = 1 to count(CDXTwoRememberSeltextList)
  262.                     set the loc of sprite getAt(getAt(CDXTwoRememberSeltextList, z), 1) to point(getAt(getAt(CDXTwoRememberSeltextList, z), 2), getAt(getAt(CDXTwoRememberSeltextList, z), 3))
  263.                     set the memberNum of sprite getAt(getAt(CDXTwoRememberSeltextList, z), 1) to getAt(getAt(CDXTwoRememberSeltextList, z), 4)
  264.                   end repeat
  265.                   updateStage()
  266.                   set CDXTwoRememberlist to list()
  267.                   set CDXTwoRememberNamelist to list()
  268.                   set CDXTwoRememberSeltextList to list()
  269.                 end if
  270.             end case
  271.         end case
  272.     end case
  273.   end if
  274. end
  275.