home *** CD-ROM | disk | FTP | other *** search
/ Mundo do CD-ROM 2 / CDROM02.iso / infantil / mestre / p_resol.dxr / 00001_Principal.ls next >
Encoding:
Text File  |  1996-07-27  |  17.6 KB  |  771 lines

  1. on startMovie
  2.   global Tarefa, GTodosNomes, GExec
  3.   if not GExec then
  4.     set the visible of sprite 1 to 1
  5.     set the visible of sprite 2 to 1
  6.     set the visible of sprite 3 to 1
  7.     set the visible of sprite 4 to 1
  8.     set the visible of sprite 5 to 1
  9.     set the visible of sprite 6 to 1
  10.     set the visible of sprite 15 to 1
  11.     set the hilite of cast "C-sim" to 1
  12.     set the hilite of cast "C-n├úo" to 0
  13.     set Tarefa to EMPTY
  14.     DefinirPosTar()
  15.     put GTodosNomes into field "CampoTarefas"
  16.   else
  17.     Esconder()
  18.     set the keyDownScript to "VerTecla"
  19.   end if
  20. end
  21.  
  22. on DefinirPosTar
  23.   global TobjA1, EobjA1, TobjA2, EobjA2, TobjAU, EobjAU, TobjC1, EobjC1, TobjC2, EobjC2, TobjC3, EobjC3
  24.   set TobjAU to 45
  25.   set EobjAU to 245
  26.   set TobjA1 to 45
  27.   set EobjA1 to 145
  28.   set TobjA2 to 45
  29.   set EobjA2 to 345
  30.   set TobjC1 to 290
  31.   set EobjC1 to 40
  32.   set TobjC2 to 290
  33.   set EobjC2 to 245
  34.   set TobjC3 to 290
  35.   set EobjC3 to 450
  36. end
  37.  
  38. on Escolha
  39.   global LNmax, Tarefa
  40.   if (the mouseLine > 0) and (the mouseLine <= LNmax) then
  41.     set IL to the mouseLine
  42.     hilite line IL of field "CampoTarefas"
  43.     set Tarefa to line IL of field "CampoTarefas"
  44.   end if
  45. end
  46.  
  47. on Resolver
  48.   global Tarefa, mt, TarResp, mhinicio, Lmax, GExec
  49.   if Tarefa <> EMPTY then
  50.     if field "NomeUsu" <> EMPTY then
  51.       set TarResp to []
  52.       CarregaLicao(Tarefa)
  53.       Esconder()
  54.       set mt to 0
  55.       set mhinicio to the time
  56.       set GExec to 1
  57.       set the keyDownScript to "VerTecla"
  58.       MostraPrim()
  59.     else
  60.       alert("Informe o seu nome !")
  61.     end if
  62.   else
  63.     alert("Escolha uma tarefa !")
  64.   end if
  65. end
  66.  
  67. on LerImagens
  68.   global mt, GSep
  69.   if getAt(LLicAI1, mt) <> EMPTY then
  70.     importFileInto(cast 495, the pathName & "Imagens" & GSep & getAt(LLicAI1, mt) & ".PIC")
  71.     set the name of cast 495 to "AI-1"
  72.   end if
  73.   if getAt(LLicAI2, mt) <> EMPTY then
  74.     importFileInto(cast 496, the pathName & "Imagens" & GSep & getAt(LLicAI2, mt) & ".PIC")
  75.     set the name of cast 496 to "AI-2"
  76.   end if
  77.   if getAt(LLicCI1, mt) <> EMPTY then
  78.     importFileInto(cast 497, the pathName & "Imagens" & GSep & getAt(LLicCI1, mt) & ".PIC")
  79.     set the name of cast 497 to "CI-1"
  80.   end if
  81.   if getAt(LLicCI2, mt) <> EMPTY then
  82.     importFileInto(cast 498, the pathName & "Imagens" & GSep & getAt(LLicCI2, mt) & ".PIC")
  83.     set the name of cast 498 to "CI-2"
  84.   end if
  85.   if getAt(LLicCI3, mt) <> EMPTY then
  86.     importFileInto(cast 499, the pathName & "Imagens" & GSep & getAt(LLicCI3, mt) & ".PIC")
  87.     set the name of cast 499 to "CI-3"
  88.   end if
  89. end
  90.  
  91. on Esconder
  92.   repeat with mi = 1 to 48
  93.     set the visible of sprite mi to 0
  94.   end repeat
  95.   set the visible of sprite 19 to 1
  96. end
  97.  
  98. on EsconderPar
  99.   global mt
  100.   set mta to getAt(LLicTA, mt)
  101.   set mtc to getAt(LLicTC, mt)
  102.   if char 1 of mta = "I" then
  103.     set the visible of sprite 1 to 0
  104.     set the visible of sprite 6 to 0
  105.   else
  106.     if char 1 of mta = "T" then
  107.       set the visible of sprite 11 to 0
  108.       set the visible of sprite 12 to 0
  109.       set the visible of sprite 14 to 0
  110.     else
  111.       if char 1 of mta = "S" then
  112.         set the visible of sprite 16 to 0
  113.         set the visible of sprite 18 to 0
  114.       end if
  115.     end if
  116.   end if
  117.   if char 2 of mta = "I" then
  118.     set the visible of sprite 2 to 0
  119.   else
  120.     if char 2 of mta = "T" then
  121.       set the visible of sprite 13 to 0
  122.       set the visible of sprite 15 to 0
  123.     else
  124.       if char 2 of mta = "S" then
  125.         set the visible of sprite 17 to 0
  126.       end if
  127.     end if
  128.   end if
  129.   if mtc = "I" then
  130.     set the visible of sprite 3 to 0
  131.     set the visible of sprite 4 to 0
  132.     set the visible of sprite 5 to 0
  133.   else
  134.     if mtc = "T" then
  135.       set the visible of sprite 8 to 0
  136.       set the visible of sprite 9 to 0
  137.       set the visible of sprite 10 to 0
  138.     else
  139.       if mtc = "L" then
  140.         repeat with mi = 20 to 47
  141.           set the visible of sprite mi to 0
  142.         end repeat
  143.       end if
  144.     end if
  145.   end if
  146.   if the hilite of cast "C-sim" = 1 then
  147.     set the visible of sprite 1 to 0
  148.     set the visible of sprite 2 to 0
  149.     set the visible of sprite 3 to 0
  150.     set the visible of sprite 4 to 0
  151.   end if
  152.   set the visible of sprite 48 to 0
  153.   set the visible of sprite 19 to 1
  154. end
  155.  
  156. on VerTudo
  157.   repeat with mi = 1 to 48
  158.     set the visible of sprite mi to 1
  159.   end repeat
  160. end
  161.  
  162. on ClickAU
  163.   global mcomp
  164.   if not mcomp then
  165.     MostraCom()
  166.   end if
  167. end
  168.  
  169. on ClickA1
  170.   global mamo2
  171.   if not mamo2 then
  172.     MostraAm2()
  173.   end if
  174. end
  175.  
  176. on ClickA2
  177.   global mcomp
  178.   if not mcomp then
  179.     MostraCom()
  180.   end if
  181. end
  182.  
  183. on ClickC1
  184.   Resposta(1)
  185.   MostraPrim()
  186. end
  187.  
  188. on ClickC2
  189.   Resposta(2)
  190.   MostraPrim()
  191. end
  192.  
  193. on ClickC3
  194.   Resposta(3)
  195.   MostraPrim()
  196. end
  197.  
  198. on CorrerLetra L
  199.   set mdiv to 4
  200.   if L > 9 then
  201.     set mdiv to 5
  202.   end if
  203.   if L > 18 then
  204.     set mdiv to 6
  205.   end if
  206.   set X to the locH of sprite (20 + L)
  207.   set Y to the locV of sprite (20 + L)
  208.   set mpassox to integer(300 - X) / mdiv
  209.   set mpassoy to integer(220 - Y) / mdiv
  210.   set X1 to X + mpassox
  211.   set X2 to X1 + mpassox
  212.   set X3 to X2 + mpassox
  213.   set X4 to X3 + mpassox
  214.   set X5 to X4 + mpassox
  215.   set Y1 to Y + mpassoy
  216.   set Y2 to Y1 + mpassoy
  217.   set Y3 to Y2 + mpassoy
  218.   set Y4 to Y3 + mpassoy
  219.   set Y5 to Y4 + mpassoy
  220.   set the locH of sprite (20 + L) to X1
  221.   set the locV of sprite (20 + L) to Y1
  222.   updateStage()
  223.   set the locH of sprite (20 + L) to X2
  224.   set the locV of sprite (20 + L) to Y2
  225.   updateStage()
  226.   set the locH of sprite (20 + L) to X3
  227.   set the locV of sprite (20 + L) to Y3
  228.   updateStage()
  229.   if L > 9 then
  230.     set the locH of sprite (20 + L) to X4
  231.     set the locV of sprite (20 + L) to Y4
  232.     updateStage()
  233.   end if
  234.   if L > 18 then
  235.     set the locH of sprite (20 + L) to X5
  236.     set the locV of sprite (20 + L) to Y5
  237.     updateStage()
  238.   end if
  239.   set the visible of sprite (20 + L) to 0
  240.   set the locH of sprite (20 + L) to X
  241.   set the locV of sprite (20 + L) to Y
  242. end
  243.  
  244. on ClickLetras L
  245.   global mt, mreslet, mcontlet
  246.   set mletra to char 1 of field ("Let-" & L)
  247.   if (mletra <> " ") and (mletra <> EMPTY) then
  248.     set mcontlet to mcontlet + 1
  249.     put mletra after mreslet
  250.     set mcerto to char 1 to mcontlet of getAt(LLicRC, mt)
  251.     if mreslet = mcerto then
  252.       CorrerLetra(L)
  253.       put mreslet into field "Resp-Let"
  254.       if getAt(LLicRC, mt) = mreslet then
  255.         updateStage()
  256.         if the hilite of cast "C-sim" = 0 then
  257.           Espera()
  258.         end if
  259.         Resposta(mreslet)
  260.         MostraPrim()
  261.       end if
  262.     else
  263.       Resposta(mreslet)
  264.       MostraPrim()
  265.     end if
  266.   end if
  267. end
  268.  
  269. on VerTecla
  270.   global mamo2, mcomp, mt, LLicTC
  271.   if the key = " " then
  272.     if not mamo2 then
  273.       MostraAm2()
  274.     else
  275.       if not mcomp then
  276.         MostraCom()
  277.       end if
  278.     end if
  279.   end if
  280.   if getAt(LLicTC, mt) = "L" then
  281.     if (the key >= "A") and (the key <= "z") then
  282.       set mr to 0
  283.       repeat with k = 27 down to 1
  284.         if (char 1 of field ("Let-" & k) = the key) and (the visible of sprite (k + 20) = 1) then
  285.           set mr to k
  286.         end if
  287.       end repeat
  288.       if mr > 0 then
  289.         ClickLetras(mr)
  290.       end if
  291.     end if
  292.   else
  293.     if mcomp then
  294.       if the key = 1 then
  295.         Resposta(1)
  296.         MostraPrim()
  297.       end if
  298.       if the key = 2 then
  299.         Resposta(2)
  300.         MostraPrim()
  301.       end if
  302.       if the key = 3 then
  303.         Resposta(3)
  304.         MostraPrim()
  305.       end if
  306.     end if
  307.   end if
  308. end
  309.  
  310. on Resposta mrp
  311.   global TarResp, mt, mconseq, mtroca
  312.   if getAt(LLicTC, mt) = "T" then
  313.     if mrp = 1 then
  314.       set mresp to field "ComTex1"
  315.     else
  316.       if mrp = 2 then
  317.         set mresp to field "ComTex2"
  318.       else
  319.         if mrp = 3 then
  320.           set mresp to field "ComTex3"
  321.         end if
  322.       end if
  323.     end if
  324.   end if
  325.   if getAt(LLicTC, mt) = "I" then
  326.     if mrp = 1 then
  327.       set mresp to getAt(LLicCI1, mt)
  328.     else
  329.       if mrp = 2 then
  330.         set mresp to getAt(LLicCI2, mt)
  331.       else
  332.         if mrp = 3 then
  333.           set mresp to getAt(LLicCI3, mt)
  334.         end if
  335.       end if
  336.     end if
  337.   end if
  338.   if getAt(LLicTC, mt) = "L" then
  339.     set mresp to mrp
  340.   end if
  341.   append(TarResp, mresp)
  342.   if the hilite of cast "C-sim" = 1 then
  343.     set mtroca to random(2)
  344.     if mtroca = 1 then
  345.       if mresp = getAt(LLicRC, mt) then
  346.         play movie "P_Basq_C"
  347.       else
  348.         play movie "P_Basq_E"
  349.       end if
  350.     else
  351.       if mtroca = 2 then
  352.         if mresp = getAt(LLicRC, mt) then
  353.           play movie "P_Pat_C"
  354.         else
  355.           play movie "P_Pat_E"
  356.         end if
  357.       else
  358.         if mtroca = 3 then
  359.           if mresp = getAt(LLicRC, mt) then
  360.             play movie "P_Ska_C"
  361.           else
  362.             play movie "P_Ska_E"
  363.           end if
  364.         else
  365.           if mtroca = 4 then
  366.             if mresp = getAt(LLicRC, mt) then
  367.               play movie "P_Cor_C"
  368.             else
  369.               play movie "P_Cor_E"
  370.             end if
  371.           end if
  372.         end if
  373.       end if
  374.     end if
  375.   else
  376.     EsconderPar()
  377.   end if
  378.   updateStage()
  379. end
  380.  
  381. on MostraObj Sp, Ob, X, Y
  382.   set the castNum of sprite Sp to the number of cast Ob
  383.   set mlarg to the width of cast Ob
  384.   set maltu to the height of cast Ob
  385.   if maltu > mlarg then
  386.     set mlarg to 150 * mlarg / maltu
  387.     set maltu to 150
  388.   else
  389.     set maltu to 150 * maltu / mlarg
  390.     set mlarg to 150
  391.   end if
  392.   set mesq to ((150 - mlarg) / 2) + X
  393.   set mdir to mesq + mlarg
  394.   set mtop to ((150 - maltu) / 2) + Y
  395.   set mbas to mtop + maltu
  396.   spriteBox(Sp, mesq, mtop, mdir, mbas)
  397. end
  398.  
  399. on MostraAIU
  400.   global EobjAU, TobjAU, mamo2
  401.   set mamo2 to 1
  402.   set the visible of sprite 6 to 1
  403.   MostraObj(6, "AI-1", EobjAU, TobjAU)
  404.   updateStage()
  405. end
  406.  
  407. on MostraAI1
  408.   global EobjA1, TobjA1
  409.   set the visible of sprite 1 to 1
  410.   MostraObj(1, "AI-1", EobjA1, TobjA1)
  411.   updateStage()
  412. end
  413.  
  414. on MostraAI2
  415.   global EobjA2, TobjA2
  416.   set the visible of sprite 2 to 1
  417.   MostraObj(2, "AI-2", EobjA2, TobjA2)
  418.   updateStage()
  419. end
  420.  
  421. on MostraCI
  422.   global EobjC1, TobjC1, EobjC2, TobjC2, EobjC3, TobjC3
  423.   set the visible of sprite 3 to 1
  424.   set the visible of sprite 4 to 1
  425.   set the visible of sprite 5 to 1
  426.   MostraObj(3, "CI-1", EobjC1, TobjC1)
  427.   MostraObj(4, "CI-2", EobjC2, TobjC2)
  428.   MostraObj(5, "CI-3", EobjC3, TobjC3)
  429.   updateStage()
  430. end
  431.  
  432. on MostraATU
  433.   global mt, mamo2
  434.   set mamo2 to 1
  435.   set the visible of sprite 11 to 1
  436.   put getAt(LLicAT1, mt) into field "AmTexU"
  437.   if getAt(LLicTC, mt) = "L" then
  438.     set the textAlign of field "AmTexU" to "left"
  439.   else
  440.     set the textAlign of field "AmTexU" to "center"
  441.   end if
  442.   updateStage()
  443. end
  444.  
  445. on MostraAT1
  446.   global mt
  447.   set the visible of sprite 12 to 1
  448.   put getAt(LLicAT1, mt) into field "AmTex1"
  449.   updateStage()
  450. end
  451.  
  452. on MostraAT2
  453.   global mt
  454.   set the visible of sprite 13 to 1
  455.   put getAt(LLicAT2, mt) into field "AmTex2"
  456.   updateStage()
  457. end
  458.  
  459. on MostraATSup
  460.   global mt
  461.   set the visible of sprite 14 to 1
  462.   put getAt(LLicAT1, mt) into field "AmTexSup"
  463.   updateStage()
  464. end
  465.  
  466. on MostraATInf
  467.   global mt
  468.   set the visible of sprite 15 to 1
  469.   put getAt(LLicAT2, mt) into field "AmTexInf"
  470.   updateStage()
  471. end
  472.  
  473. on Espera
  474.   startTimer()
  475.   repeat while the timer < 100
  476.     nothing()
  477.   end repeat
  478. end
  479.  
  480. on MostraASU
  481.   global mt, mamo2, GSep
  482.   set mamo2 to 1
  483.   set the visible of sprite 18 to 1
  484.   updateStage()
  485.   set NS to the pathName & "Sons" & GSep & getAt(LLicAS1, mt)
  486.   repeat while 1
  487.     sound playFile 1, NS
  488.     repeat while soundBusy(1)
  489.       if the mouseDown then
  490.         exit
  491.       end if
  492.     end repeat
  493.     if the mouseDown then
  494.       exit
  495.       next repeat
  496.     end if
  497.     Espera()
  498.   end repeat
  499. end
  500.  
  501. on MostraAS1
  502.   global mt, GSep
  503.   set the visible of sprite 16 to 1
  504.   updateStage()
  505.   set NS to the pathName & "Sons" & GSep & getAt(LLicAS1, mt)
  506.   repeat while 1
  507.     sound playFile 1, NS
  508.     repeat while soundBusy(1)
  509.       if the mouseDown then
  510.         exit
  511.       end if
  512.     end repeat
  513.     if the mouseDown then
  514.       exit
  515.       next repeat
  516.     end if
  517.     Espera()
  518.   end repeat
  519. end
  520.  
  521. on MostraAS2
  522.   global mt, GSep
  523.   set the visible of sprite 17 to 1
  524.   updateStage()
  525.   set NS to the pathName & "Sons" & GSep & getAt(LLicAS2, mt)
  526.   repeat while 1
  527.     sound playFile 1, NS
  528.     repeat while soundBusy(1)
  529.       if the mouseDown then
  530.         exit
  531.       end if
  532.     end repeat
  533.     if the mouseDown then
  534.       exit
  535.       next repeat
  536.     end if
  537.     Espera()
  538.   end repeat
  539. end
  540.  
  541. on MostraCT
  542.   global mt
  543.   set the visible of sprite 8 to 1
  544.   set the visible of sprite 9 to 1
  545.   set the visible of sprite 10 to 1
  546.   put getAt(LLicCT1, mt) into field "ComTex1"
  547.   put getAt(LLicCT2, mt) into field "ComTex2"
  548.   put getAt(LLicCT3, mt) into field "ComTex3"
  549.   updateStage()
  550. end
  551.  
  552. on MostraCL
  553.   global mt, mreslet, mcontlet
  554.   set mreslet to EMPTY
  555.   put EMPTY into field "Resp-Let"
  556.   if getAt(LLicTA, mt) = "T" then
  557.     set the textAlign of field "Resp-Let" to "left"
  558.   else
  559.     set the textAlign of field "Resp-Let" to "center"
  560.   end if
  561.   set mcontlet to 0
  562.   set the visible of sprite 19 to 1
  563.   set the visible of sprite 20 to 1
  564.   repeat with mi = 1 to 27
  565.     set the visible of sprite (mi + 20) to 1
  566.     put 
  567.     put char mi of getAt(LLicCL, mt) into field ("Let-" & mi)
  568.   end repeat
  569.   updateStage()
  570. end
  571.  
  572. on MostraPrim
  573.   global mt, LLicTA, LLicTC, mhfinal, mamo2, mcomp, GExec, Lmax
  574.   set mt to mt + 1
  575.   if mt <= 2 then
  576.     set mta to getAt(LLicTA, mt)
  577.     set mtc to getAt(LLicTC, mt)
  578.     set mamo2 to 0
  579.     set mcomp to 0
  580.     if ((mtc = "T") or (mtc = "I")) and (the frame <> 10) then
  581.       go("Tarefas-TI")
  582.     else
  583.       if (mtc = "L") and (the frame <> 20) then
  584.         go("Tarefas-Letras")
  585.       end if
  586.     end if
  587.     if mt = 1 then
  588.       puppetSprite(1, 1)
  589.       puppetSprite(2, 1)
  590.       puppetSprite(3, 1)
  591.       puppetSprite(4, 1)
  592.       puppetSprite(5, 1)
  593.       puppetSprite(6, 1)
  594.     end if
  595.     if (char 1 of mta = "I") or (char 2 of mta = "I") or (mtc = "I") then
  596.       LerImagens()
  597.     end if
  598.     if mta = "I" then
  599.       MostraAIU()
  600.     end if
  601.     if (mta = "II") or (mta = "IT") or (mta = "IS") then
  602.       MostraAI1()
  603.     end if
  604.     if mta = "T" then
  605.       MostraATU()
  606.     end if
  607.     if (mta = "TI") or (mta = "TS") then
  608.       MostraAT1()
  609.     end if
  610.     if mta = "TT" then
  611.       MostraATSup()
  612.     end if
  613.     if mta = "S" then
  614.       MostraASU()
  615.     end if
  616.     if (mta = "SI") or (mta = "ST") or (mta = "SS") then
  617.       MostraAS1()
  618.     end if
  619.   else
  620.     set mhfinal to the time
  621.     set GExec to 0
  622.     set the keyDownScript to EMPTY
  623.     puppetSprite(1, 0)
  624.     puppetSprite(2, 0)
  625.     puppetSprite(3, 0)
  626.     puppetSprite(4, 0)
  627.     puppetSprite(5, 0)
  628.     puppetSprite(6, 0)
  629.     go(1)
  630.     EscreverResposta()
  631.     VerTudo()
  632.   end if
  633. end
  634.  
  635. on MostraAm2
  636.   global mt, LLicTA, mamo2
  637.   set mamo2 to 1
  638.   if (getAt(LLicTA, mt) = "II") or (getAt(LLicTA, mt) = "TI") or (getAt(LLicTA, mt) = "SI") then
  639.     MostraAI2()
  640.   end if
  641.   if (getAt(LLicTA, mt) = "IT") or (getAt(LLicTA, mt) = "ST") then
  642.     MostraAT2()
  643.   end if
  644.   if getAt(LLicTA, mt) = "TT" then
  645.     MostraATInf()
  646.   end if
  647.   if (getAt(LLicTA, mt) = "IS") or (getAt(LLicTA, mt) = "TS") or (getAt(LLicTA, mt) = "SS") then
  648.     MostraAS2()
  649.   end if
  650.   updateStage()
  651. end
  652.  
  653. on MostraCom
  654.   global mt, LLicTC, mcomp
  655.   set mcomp to 1
  656.   if getAt(LLicTC, mt) = "I" then
  657.     MostraCI()
  658.   end if
  659.   if getAt(LLicTC, mt) = "T" then
  660.     MostraCT()
  661.   end if
  662.   if getAt(LLicTC, mt) = "L" then
  663.     MostraCL()
  664.   end if
  665.   updateStage()
  666. end
  667.  
  668. on EscreverResposta
  669.   alert("Esta ├⌐ uma vers├úo de demonstra├º├úo. Para adquirir a vers├úo completa entre em contato com a Mestre Software pelo fone (016) 272-6977 r.231.")
  670. end
  671.  
  672. on Pordata D
  673.   set mb to offset("/", D)
  674.   set mm to chars(D, 1, mb - 1)
  675.   set D to chars(D, mb + 1, length(D))
  676.   set mb to offset("/", D)
  677.   set md to chars(D, 1, mb - 1)
  678.   set my to chars(D, mb + 1, length(D))
  679.   return md & "/" & mm & "/" & my
  680. end
  681.  
  682. on PorHora H
  683.   set mp to offset("M", H)
  684.   if char mp - 1 of H = "P" then
  685.     set md to offset(":", H)
  686.     set mh to chars(H, 1, md - 1)
  687.     set H to chars(H, md, length(H))
  688.     set mh to mh + 12
  689.     set H to integer(mh) & H
  690.     if mh <= 21 then
  691.       set mp to mp + 1
  692.     end if
  693.   end if
  694.   set mf to chars(H, 1, mp - 2) & "hs"
  695.   return mf
  696. end
  697.  
  698. on CarregaLicao NLicao
  699.   global Lmax, LLicAI1, LLicAI2, LLicCI1, LLicCI2, LLicCI3, LLicRC, LLicAT1, LLicAT2, LLicCT1, LLicCT2, LLicCT3, LTOTAL, LLicAS1, LLicAS2, LLicCL, LLicTA, LLicTC, mFIM, SISTEMA, Gpole, GCini, GSep
  700.   set LTOTAL to []
  701.   set LLicAI1 to []
  702.   set LLicAI2 to []
  703.   set LLicCI1 to []
  704.   set LLicCI2 to []
  705.   set LLicCI3 to []
  706.   set LLicRC to []
  707.   set LLicAT1 to []
  708.   set LLicAT2 to []
  709.   set LLicCT1 to []
  710.   set LLicCT2 to []
  711.   set LLicCT3 to []
  712.   set LLicAS1 to []
  713.   set LLicAS2 to []
  714.   set LLicCL to []
  715.   set LLicTA to []
  716.   set LLicTC to []
  717.   if SISTEMA = "WIN" then
  718.     openXLib(the pathName & "FileIO.DLL")
  719.   end if
  720.   set LerLicao to FileIO(mnew, "read", the pathName & "Tarefas" & GSep & NLicao & ".txt")
  721.   set mFIM to "INICIO"
  722.   set Lmax to 0
  723.   set mFIM to GCini & LerLicao(mReadLine)
  724.   repeat while mFIM <> EMPTY
  725.     if offset(char 1 of mFIM, "#%┬º") = 0 then
  726.       set mFIM to char 1 to length(mFIM) of mFIM
  727.     end if
  728.     append(LTOTAL, char Gpole + 1 to length(mFIM) - 1 of mFIM)
  729.     set Lmax to Lmax + 1
  730.     set mFIM to LerLicao(mReadLine)
  731.   end repeat
  732.   LerLicao(mdispose)
  733.   set ILB to 1
  734.   set Lruim to 0
  735.   repeat while ILB <= Lmax
  736.     set mFIM to getAt(LTOTAL, ILB)
  737.     if length(mFIM) > 20 then
  738.       set mvazio to LerCampo()
  739.       append(LLicAI1, LerCampo())
  740.       append(LLicAI2, LerCampo())
  741.       append(LLicCI1, LerCampo())
  742.       append(LLicCI2, LerCampo())
  743.       append(LLicCI3, LerCampo())
  744.       append(LLicRC, LerCampo())
  745.       append(LLicAT1, LerCampo())
  746.       append(LLicAT2, LerCampo())
  747.       append(LLicCT1, LerCampo())
  748.       append(LLicCT2, LerCampo())
  749.       append(LLicCT3, LerCampo())
  750.       append(LLicAS1, LerCampo())
  751.       append(LLicAS2, LerCampo())
  752.       append(LLicCL, LerCampo())
  753.       append(LLicTA, LerCampo())
  754.       append(LLicTC, LerCampo())
  755.     else
  756.       set Lruim to Lruim + 1
  757.     end if
  758.     set ILB to ILB + 1
  759.   end repeat
  760.   set Lmax to Lmax - Lruim
  761.   closeXLib()
  762. end
  763.  
  764. on LerCampo
  765.   global mFIM
  766.   set mp to offset("#", mFIM)
  767.   set ma to chars(mFIM, 1, mp - 1)
  768.   set mFIM to chars(mFIM, mp + 1, length(mFIM))
  769.   return ma
  770. end
  771.