home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 4 / AACD04.ISO / AACD / Programming / CanDo / Decks1 / MoreExamples / WhatIsCando.ctx < prev    next >
Encoding:
Text File  |  1998-07-25  |  35.4 KB  |  1,583 lines

  1. *************
  2. * Deck "WhatIsCanDo"
  3. *************
  4.  
  5. *************
  6. * Card(s) in deck.
  7. *  Card "Border Styles"
  8. *  Card "Bouncing Ball"
  9. *  Card "Buttons"
  10. *  Card "Copter"
  11. *  Card "Documents"
  12. *  Card "Fields"
  13. *  Card "Lists"
  14. *  Card "Print Styles"
  15. *  Card "ToDo"
  16. *  Card "What Is CanDo"
  17. *************
  18. * 10 Card(s), 10 were printed.
  19. *************
  20.  
  21. *************
  22. * Natural order of Cards
  23. *  Card "Bouncing Ball"
  24. *  Card "What Is CanDo"
  25. *  Card "Buttons"
  26. *  Card "Border Styles"
  27. *  Card "Fields"
  28. *  Card "Documents"
  29. *  Card "Lists"
  30. *  Card "Print Styles"
  31. *  Card "ToDo"
  32. *  Card "Copter"
  33. *************
  34.  
  35. *************
  36. * Global Routine(s) in deck.
  37. *  Routine "Get Current ToDo"
  38. *  Routine "Get Current ToDo Lines"
  39. *  Routine "Get Next ToDo"
  40. *  Routine "Next Msg"
  41. *  Routine "Play TheSound"
  42. *  Routine "Print Main Title"
  43. *  Routine "Print Message"
  44. *  Routine "Print ToDo Number"
  45. *  Routine "Print TwoTone"
  46. *  Routine "PrintNext"
  47. *  Routine "Replace Current ToDo"
  48. *  Routine "Set TheSound"
  49. *************
  50. * 12 Global routines(s), 12 were printed.
  51. *************
  52.  
  53. *************
  54. * Card "Border Styles"
  55.     NoAttach
  56.     BeforeAttachment
  57.         LoadSound "CanDo:Sounds/Doink.8svx"
  58.     EndScript
  59.     AfterAttachment
  60.         Let ATTRACTCNT = 1
  61.         Do "Print Main Title","              CanDo Border Styles"
  62.         SetPrintFont "ruby",12
  63.         SetPen 0
  64.         PrintText "Add variety to your Buttons, Fields, and",140,124
  65.         PrintText "Documents using enhanced Border Styles.",140,138
  66.     EndScript
  67.     PictureWindow "UserWindow"
  68.         Definition
  69.             Origin 0,0
  70.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  71.             Title ""
  72.             DefaultColors 0,1,0
  73.             WindowObjects NONE 
  74.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  75.             VisualEffects NONE ,WAIT 
  76.         EndScript
  77.     EndObject
  78.     AltImageButton "Previous"
  79.         Definition
  80.             Origin 287,176
  81.             Image "CanDo:Brushes/left1.grab"
  82.             AltImage "CanDo:Brushes/left2.grab"
  83.             Shape "CanDo:Brushes/left1.grab"
  84.             ButtonFlags NONE 
  85.         EndScript
  86.         OnRelease
  87.             Let ATTRACTCNT = 0
  88.             PreviousCard
  89.         EndScript
  90.     EndObject
  91.     AltImageButton "Next"
  92.         Definition
  93.             Origin 341,176
  94.             Image "CanDo:Brushes/right1.grab"
  95.             AltImage "CanDo:Brushes/right2.grab"
  96.             Shape "CanDo:Brushes/right1.grab"
  97.             ButtonFlags NONE 
  98.         EndScript
  99.         OnRelease
  100.             Let ATTRACTCNT = 0
  101.             NextCard
  102.         EndScript
  103.     EndObject
  104.     TextButton "Quit"
  105.         Definition
  106.             Origin 70,19
  107.             Font "ruby",12 ; FontName, PointSize
  108.             Style SHADOW ,2,3
  109.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  110.             Text "Quit"
  111.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  112.             Highlight COMPLEMENT 
  113.             ButtonFlags NONE 
  114.         EndScript
  115.         OnRelease
  116.             Quit
  117.         EndScript
  118.     EndObject
  119.     TextButton "BUTTON#1"
  120.         Definition
  121.             Origin 101,73
  122.             Font "ruby",8 ; FontName, PointSize
  123.             Style OUTLINE ,2,3
  124.             TextColors 7,0,JAM1  ; PenA, PenB, DrawMode
  125.             Text "   None   "
  126.             Border NONE ,7,6 ; BorderStyle, MainPen, ExtraPen
  127.             Highlight COMPLEMENT 
  128.             ButtonFlags NONE 
  129.         EndScript
  130.         OnRelease
  131.             PlaySound "CanDo:Sounds/Doink.8svx",ONCE ,300
  132.             Let ATTRACTCNT = ATTRACTCNT + 1
  133.         EndScript
  134.     EndObject
  135.     TextButton "BUTTON#2"
  136.         Definition
  137.             Origin 280,73
  138.             Font "ruby",8 ; FontName, PointSize
  139.             Style OUTLINE ,2,3
  140.             TextColors 7,0,JAM1  ; PenA, PenB, DrawMode
  141.             Text "  Double  "
  142.             Border DOUBLEOUTLINE ,3,6 ; BorderStyle, MainPen, ExtraPen
  143.             Highlight COMPLEMENT 
  144.             ButtonFlags NONE 
  145.         EndScript
  146.         OnRelease
  147.             PlaySound "CanDo:Sounds/Doink.8svx",ONCE ,600
  148.             Let ATTRACTCNT = ATTRACTCNT + 1
  149.         EndScript
  150.     EndObject
  151.     TextButton "BUTTON#3"
  152.         Definition
  153.             Origin 460,73
  154.             Font "ruby",8 ; FontName, PointSize
  155.             Style OUTLINE ,2,3
  156.             TextColors 7,0,JAM1  ; PenA, PenB, DrawMode
  157.             Text " Embossed "
  158.             Border EMBOSSED ,0,6 ; BorderStyle, MainPen, ExtraPen
  159.             Highlight COMPLEMENT 
  160.             ButtonFlags NONE 
  161.         EndScript
  162.         OnRelease
  163.             PlaySound "CanDo:Sounds/Doink.8svx",ONCE ,900
  164.             Let ATTRACTCNT = ATTRACTCNT + 1
  165.         EndScript
  166.     EndObject
  167.     TextButton "BUTTON#4"
  168.         Definition
  169.             Origin 101,100
  170.             Font "ruby",8 ; FontName, PointSize
  171.             Style OUTLINE ,2,3
  172.             TextColors 7,0,JAM1  ; PenA, PenB, DrawMode
  173.             Text " Outline  "
  174.             Border OUTLINE ,5,6 ; BorderStyle, MainPen, ExtraPen
  175.             Highlight COMPLEMENT 
  176.             ButtonFlags NONE 
  177.         EndScript
  178.         OnRelease
  179.             PlaySound "CanDo:Sounds/Doink.8svx",ONCE ,1200
  180.             Let ATTRACTCNT = ATTRACTCNT + 1
  181.         EndScript
  182.     EndObject
  183.     TextButton "BUTTON#5"
  184.         Definition
  185.             Origin 280,100
  186.             Font "ruby",8 ; FontName, PointSize
  187.             Style OUTLINE ,2,3
  188.             TextColors 7,0,JAM1  ; PenA, PenB, DrawMode
  189.             Text "  3D Box  "
  190.             Border BOX ,7,2 ; BorderStyle, MainPen, ExtraPen
  191.             Highlight COMPLEMENT 
  192.             ButtonFlags NONE 
  193.         EndScript
  194.         OnRelease
  195.             PlaySound "CanDo:Sounds/Doink.8svx",ONCE ,1500
  196.             Let ATTRACTCNT = ATTRACTCNT + 1
  197.         EndScript
  198.     EndObject
  199.     TextButton "BUTTON#6"
  200.         Definition
  201.             Origin 460,100
  202.             Font "ruby",8 ; FontName, PointSize
  203.             Style OUTLINE ,2,3
  204.             TextColors 7,0,JAM1  ; PenA, PenB, DrawMode
  205.             Text "  Shadow  "
  206.             Border SHADOW ,4,2 ; BorderStyle, MainPen, ExtraPen
  207.             Highlight COMPLEMENT 
  208.             ButtonFlags NONE 
  209.         EndScript
  210.         OnRelease
  211.             PlaySound "CanDo:Sounds/Doink.8svx",ONCE ,1800
  212.             Let ATTRACTCNT = ATTRACTCNT + 1
  213.         EndScript
  214.     EndObject
  215.     IntervalTimer "Attract"
  216.         Definition
  217.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  218.         EndScript
  219.         Occurred
  220.             Let ATTRACTCNT = ATTRACTCNT - 1
  221.             If ATTRACTCNT <= 0
  222.                 NextCard
  223.             EndIf
  224.         EndScript
  225.     EndObject
  226. * End of Card "Border Styles"
  227. *************
  228.  
  229. *************
  230. * Card "Bouncing Ball"
  231.     BeforeAttachment
  232.         LoadBrushAnim "CanDo:BrushAnims/Ball.banm"
  233.         LoadSound "CanDo:Sounds/Boing.8svx"
  234.     EndScript
  235.     AfterAttachment
  236.         ShowPalette "CanDo:BrushAnims/Ball.banm"
  237.         SetPrintFont "ruby",15
  238.         SetPrintStyle SHADOW ,2,3
  239.         SetPen 1,0
  240.         SetDrawMode JAM1 
  241.         PrintText "CanDo",58,5
  242.         SetPrintFont "ruby",8
  243.         SetPen 1,0
  244.         PrintText "by INOVAtronics",135,10
  245.         SetBrushAnimFlags "CanDo:BrushAnims/Ball.banm",LINEARMOTION ,64
  246.         ShowBrushAnim "CanDo:BrushAnims/Ball.banm",120,22
  247.         MoveBrushAnim "CanDo:BrushAnims/Ball.banm",1,0,0,0,273-120
  248.     EndScript
  249.     BeforeDetachment
  250.         Let MSGCNT = 0
  251.     EndScript
  252.     Window "UserWindow"
  253.         Definition
  254.             Origin 0,0
  255.             Size 320,200
  256.             Title ""
  257.             NumberOfColors 4
  258.             DefaultColors 0,1,0
  259.             WindowObjects NONE 
  260.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  261.             VisualEffects NONE ,WAIT 
  262.         EndScript
  263.     EndObject
  264.     IntervalTimer "Attract"
  265.         Definition
  266.             Duration 0,30,0 ; Minutes, Seconds, Jiffies
  267.         EndScript
  268.         Occurred
  269.             Let ATTRACTCNT = ATTRACTCNT - 1
  270.             If ATTRACTCNT <= 0
  271.                 NextCard
  272.             EndIf
  273.         EndScript
  274.     EndObject
  275.     BrushAnimFrame "Ball.banm-FRAME1·0"
  276.         Definition
  277.             BrushAnimBuffer "CanDo:BrushAnims/Ball.banm"
  278.             Frame 1 ; The BrushAnim frame number
  279.         EndScript
  280.         Occurred
  281.             SetChannel 2
  282.             PlaySound "CanDo:Sounds/Boing.8svx"
  283.             SetChannel 3
  284.             PlaySound "CanDo:Sounds/Boing.8svx"
  285.         EndScript
  286.     EndObject
  287.     BrushAnim "Ball"
  288.         Definition
  289.             BrushAnimBuffer "CanDo:BrushAnims/Ball.banm"
  290.         EndScript
  291.         OnArrivalAtDestination
  292.             GetBrushAnimCoordinates "CanDo:BrushAnims/Ball.banm",X,Y
  293.             If X < 120
  294.                 SetChannel 1
  295.                 MoveBrushAnim "CanDo:BrushAnims/Ball.banm",1,0,0,0,273
  296.             Else
  297.                 SetChannel 0
  298.                 MoveBrushAnim "CanDo:BrushAnims/Ball.banm",-1,0,0,0,273
  299.             EndIf
  300.             PlaySound "CanDo:Sounds/Boing.8svx",ONCE ,275
  301.         EndScript
  302.     EndObject
  303.     AreaButton "BUTTON#1"
  304.         Definition
  305.             Origin 0,0
  306.             Size 320,200
  307.             Border OUTLINE ,1,2 ; BorderStyle, MainPen, ExtraPen
  308.             Highlight NONE 
  309.             ButtonFlags NONE 
  310.         EndScript
  311.         OnRelease
  312.             NextCard
  313.         EndScript
  314.     EndObject
  315. * End of Card "Bouncing Ball"
  316. *************
  317.  
  318. *************
  319. * Card "Buttons"
  320.     NoAttach
  321.     AfterAttachment
  322.         Do "Print Main Title","              CanDo Button Styles"
  323.     EndScript
  324.     BeforeDetachment
  325.         Let MSGCNT = 7
  326.     EndScript
  327.     PictureWindow "UserWindow"
  328.         Definition
  329.             Origin 0,0
  330.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  331.             Title ""
  332.             DefaultColors 0,1,0
  333.             WindowObjects NONE 
  334.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  335.             VisualEffects NONE ,WAIT 
  336.         EndScript
  337.     EndObject
  338.     TextButton "Quit"
  339.         Definition
  340.             Origin 70,19
  341.             Font "ruby",12 ; FontName, PointSize
  342.             Style SHADOW ,2,3
  343.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  344.             Text "Quit"
  345.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  346.             Highlight COMPLEMENT 
  347.             ButtonFlags NONE 
  348.         EndScript
  349.         OnRelease
  350.             Quit
  351.         EndScript
  352.     EndObject
  353.     AltImageButton "Previous"
  354.         Definition
  355.             Origin 287,176
  356.             Image "CanDo:Brushes/left1.grab"
  357.             AltImage "CanDo:Brushes/left2.grab"
  358.             Shape "CanDo:Brushes/left1.grab"
  359.             ButtonFlags NONE 
  360.         EndScript
  361.         OnRelease
  362.             Let ATTRACTCNT = 0
  363.             PreviousCard
  364.         EndScript
  365.     EndObject
  366.     AltImageButton "Next"
  367.         Definition
  368.             Origin 341,176
  369.             Image "CanDo:Brushes/right1.grab"
  370.             AltImage "CanDo:Brushes/right2.grab"
  371.             Shape "CanDo:Brushes/right1.grab"
  372.             ButtonFlags NONE 
  373.         EndScript
  374.         OnRelease
  375.             Let ATTRACTCNT = 0
  376.             NextCard
  377.         EndScript
  378.     EndObject
  379.     AreaButton "BUTTON#1"
  380.         Definition
  381.             Origin 100,70
  382.             Size 72,15
  383.             Border OUTLINE ,3,2 ; BorderStyle, MainPen, ExtraPen
  384.             Highlight COMPLEMENT 
  385.             ButtonFlags NONE 
  386.         EndScript
  387.         OnRelease
  388.             Let ATTRACTCNT = 1
  389.             Do "Print TwoTone","Area Buttons",4," have a rectangular Area.",5,195,72
  390.         EndScript
  391.     EndObject
  392.     TextButton "BUTTON#2"
  393.         Definition
  394.             Origin 100,100
  395.             Font "ruby",12 ; FontName, PointSize
  396.             Style UNDERLINE ITALIC SHADOW ,2,2
  397.             TextColors 5,0,JAM1  ; PenA, PenB, DrawMode
  398.             Text " Text "
  399.             Border OUTLINE ,3,2 ; BorderStyle, MainPen, ExtraPen
  400.             Highlight OUTLINE 
  401.             ButtonFlags NONE 
  402.         EndScript
  403.         OnRelease
  404.             Let ATTRACTCNT = 1
  405.             Do "Print TwoTone","Text Buttons",4," have Stylized Text.",5,195,102
  406.         EndScript
  407.     EndObject
  408.     AltImageButton "BUTTON#3"
  409.         Definition
  410.             Origin 117,131
  411.             Image "CanDo:Brushes/down1.grab"
  412.             AltImage "CanDo:Brushes/down2.grab"
  413.             Shape "CanDo:Brushes/down1.grab"
  414.             ButtonFlags NONE 
  415.         EndScript
  416.         OnRelease
  417.             Let ATTRACTCNT = 1
  418.             Do "Print TwoTone","Image Buttons",4," use Brush Imagery.",5,195,131
  419.         EndScript
  420.     EndObject
  421.     IntervalTimer "TIMER#1"
  422.         Definition
  423.             Duration 0,5,0 ; Minutes, Seconds, Jiffies
  424.         EndScript
  425.         Occurred
  426.             Let ATTRACTCNT = ATTRACTCNT + 1
  427.             If ATTRACTCNT = 3
  428.                 Do "Print TwoTone","Area Buttons",4," have a rectangular Area.",5,195,72
  429.             EndIf
  430.             If ATTRACTCNT = 4
  431.                 Do "Print TwoTone","Text Buttons",4," have Stylized Text.",5,195,102
  432.             EndIf
  433.             If ATTRACTCNT = 5
  434.                 Do "Print TwoTone","Image Buttons",4," use Brush Imagery.",5,195,131
  435.             EndIf
  436.             If ATTRACTCNT => 7
  437.                 NextCard
  438.             EndIf
  439.         EndScript
  440.     EndObject
  441. * End of Card "Buttons"
  442. *************
  443.  
  444. *************
  445. * Card "Copter"
  446.     NoAttach
  447.     BeforeAttachment
  448.         LoadBrushAnim "CanDo:BrushAnims/Helicopter1.banm"
  449.         LoadBrushAnim "CanDo:BrushAnims/Helicopter2.banm"
  450.         LoadBrushAnim "CanDo:BrushAnims/Helicopter3.banm"
  451.     EndScript
  452.     AfterAttachment
  453.         PlaySound "CanDo:Sounds/Copter.8svx",CONTINUOUS 
  454.         LoadDocument "CanDo:Text/Copter.Txt"
  455.         SetDrawMode JAM1 
  456.         SetPrintFont "ruby",15
  457.         SetPrintStyle ITALIC GHOSTED ,3,8
  458.         ShowBrushAnim "CanDo:BrushAnims/Helicopter1.banm",320,0
  459.         MoveBrushAnimTo "CanDo:BrushAnims/Helicopter1.banm",320,100,150
  460.         Let HELICOPTERPLAYING = TRUE
  461.     EndScript
  462.     BeforeDetachment
  463.         Audio OFF
  464.         Audio ON
  465.     EndScript
  466.     PictureWindow "UserWindow"
  467.         Definition
  468.             Origin 0,0
  469.             BackgroundImage "CanDo:Images/Helicopter.ilbm" ; size and depth comes from image
  470.             Title ""
  471.             DefaultColors 0,1,0
  472.             WindowObjects NONE 
  473.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  474.             VisualEffects NONE ,WAIT 
  475.         EndScript
  476.     EndObject
  477.     AltImageButton "Next"
  478.         Definition
  479.             Origin 341,176
  480.             Image "CanDo:Brushes/right1.grab"
  481.             AltImage "CanDo:Brushes/right2.grab"
  482.             Shape "CanDo:Brushes/right1.grab"
  483.             ButtonFlags NONE 
  484.         EndScript
  485.         OnRelease
  486.             NextCard
  487.         EndScript
  488.     EndObject
  489.     AltImageButton "Previous"
  490.         Definition
  491.             Origin 287,176
  492.             Image "CanDo:Brushes/left1.grab"
  493.             AltImage "CanDo:Brushes/left2.grab"
  494.             Shape "CanDo:Brushes/left1.grab"
  495.             ButtonFlags NONE 
  496.         EndScript
  497.         OnRelease
  498.             PreviousCard
  499.         EndScript
  500.     EndObject
  501.     TextButton "Quit"
  502.         Definition
  503.             Origin 16,4
  504.             Font "ruby",12 ; FontName, PointSize
  505.             Style SHADOW ,2,3
  506.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  507.             Text "Quit"
  508.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  509.             Highlight COMPLEMENT 
  510.             ButtonFlags NONE 
  511.         EndScript
  512.         OnRelease
  513.             Quit
  514.         EndScript
  515.     EndObject
  516.     BrushAnimFrame "Helicopter2.banm-FRAME3·0"
  517.         Definition
  518.             BrushAnimBuffer "CanDo:BrushAnims/Helicopter2.banm"
  519.             Frame 3 ; The BrushAnim frame number
  520.         EndScript
  521.         Occurred
  522.             PlaySound "CanDo:Sounds/Copter.8svx"
  523.             RemoveBrushAnim "CanDo:BrushAnims/Helicopter2.banm"
  524.             ShowBrushAnim "CanDo:BrushAnims/Helicopter3.banm",313,88
  525.             MoveBrushAnim "CanDo:BrushAnims/Helicopter3.banm",-1,-1,-1,0,31
  526.         EndScript
  527.     EndObject
  528.     BrushAnim "Helicopter#2"
  529.         Definition
  530.             BrushAnimBuffer "CanDo:BrushAnims/Helicopter2.banm"
  531.         EndScript
  532.     EndObject
  533.     BrushAnim "Helicopter#1"
  534.         Definition
  535.             BrushAnimBuffer "CanDo:BrushAnims/Helicopter1.banm"
  536.         EndScript
  537.         OnArrivalAtDestination
  538.             RemoveBrushAnim "CanDo:BrushAnims/Helicopter1.banm"
  539.             ShowBrushAnim "CanDo:BrushAnims/Helicopter2.banm",314,88
  540.         EndScript
  541.     EndObject
  542.     BrushAnim "Helicopter#3"
  543.         Definition
  544.             BrushAnimBuffer "CanDo:BrushAnims/Helicopter3.banm"
  545.         EndScript
  546.         OnArrivalAtDestination
  547.             RemoveBrushAnim "CanDo:BrushAnims/Helicopter3.banm"
  548.             Let HELICOPTERPLAYING = FALSE
  549.         EndScript
  550.     EndObject
  551.     IntervalTimer "Restart"
  552.         Definition
  553.             Duration 0,3,0 ; Minutes, Seconds, Jiffies
  554.         EndScript
  555.         Occurred
  556.             If NOT HELICOPTERPLAYING
  557.                 ShowBrushAnim "CanDo:BrushAnims/Helicopter1.banm",320,0
  558.                 MoveBrushAnimTo "CanDo:BrushAnims/Helicopter1.banm",320,100,150
  559.                 Let HELICOPTERPLAYING = TRUE
  560.             EndIf
  561.         EndScript
  562.     EndObject
  563.     IntervalTimer "Message Timer"
  564.         Definition
  565.             Duration 0,3,0 ; Minutes, Seconds, Jiffies
  566.         EndScript
  567.         Occurred
  568.             If THELINENUMBER <> LINESINDOCUMENT
  569.                 SetPen 0
  570.                 AreaRectangle 0,128,640,45
  571.                 SetPen 9,0
  572.                 PrintText THELINE,66,143
  573.                 MoveCursor DOWN 
  574.             Else
  575.                 NextCard
  576.             EndIf
  577.         EndScript
  578.     EndObject
  579. * End of Card "Copter"
  580. *************
  581.  
  582. *************
  583. * Card "Documents"
  584.     NoAttach
  585.     AfterAttachment
  586.         Let ATTRACTCNT = 1
  587.         Do "Print Main Title","       Include your own Text Editors!"
  588.     EndScript
  589.     PictureWindow "UserWindow"
  590.         Definition
  591.             Origin 0,0
  592.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  593.             Title ""
  594.             DefaultColors 0,1,0
  595.             WindowObjects NONE 
  596.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  597.             VisualEffects NONE ,WAIT 
  598.         EndScript
  599.     EndObject
  600.     AltImageButton "Previous"
  601.         Definition
  602.             Origin 287,176
  603.             Image "CanDo:Brushes/left1.grab"
  604.             AltImage "CanDo:Brushes/left2.grab"
  605.             Shape "CanDo:Brushes/left1.grab"
  606.             ButtonFlags NONE 
  607.         EndScript
  608.         OnRelease
  609.             Let ATTRACTCNT = 0
  610.             PreviousCard
  611.         EndScript
  612.     EndObject
  613.     AltImageButton "Next"
  614.         Definition
  615.             Origin 341,176
  616.             Image "CanDo:Brushes/right1.grab"
  617.             AltImage "CanDo:Brushes/right2.grab"
  618.             Shape "CanDo:Brushes/right1.grab"
  619.             ButtonFlags NONE 
  620.         EndScript
  621.         OnRelease
  622.             Let ATTRACTCNT = 0
  623.             NextCard
  624.         EndScript
  625.     EndObject
  626.     TextButton "Quit"
  627.         Definition
  628.             Origin 70,19
  629.             Font "ruby",12 ; FontName, PointSize
  630.             Style SHADOW ,2,3
  631.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  632.             Text "Quit"
  633.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  634.             Highlight COMPLEMENT 
  635.             ButtonFlags NONE 
  636.         EndScript
  637.         OnRelease
  638.             Quit
  639.         EndScript
  640.     EndObject
  641.     Disk "USERDISKOBJECT#1"
  642.     EndObject
  643.     Memo "DOCUMENT#1"
  644.         Definition
  645.             Origin 80,72
  646.             Size 328,80
  647.             Font "topaz",8 ; FontName, PointSize
  648.             Style PLAIN ,2,3
  649.             TextColors 7,6,JAM2  ; PenA, PenB, DrawMode
  650.             Border SHADOW ,7,2 ; BorderStyle, MainPen, ExtraPen
  651.             MemoDocument "CanDo:Text/Sample1.txt" ; where the text comes from
  652.             ScrollBars RIGHT 
  653.             InputStyle NORMAL 
  654.         EndScript
  655.         OnClick
  656.             Let ATTRACTCNT = 15
  657.         EndScript
  658.     EndObject
  659.     IntervalTimer "Attract"
  660.         Definition
  661.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  662.         EndScript
  663.         Occurred
  664.             Let ATTRACTCNT = ATTRACTCNT - 1
  665.             If ATTRACTCNT <= 0
  666.                 NextCard
  667.             EndIf
  668.         EndScript
  669.     EndObject
  670. * End of Card "Documents"
  671. *************
  672.  
  673. *************
  674. * Card "Fields"
  675.     NoAttach
  676.     AfterAttachment
  677.         Let ATTRACTCNT = 1
  678.         Do "Print Main Title","Text and Integer Fields provide Easy Input."
  679.     EndScript
  680.     PictureWindow "UserWindow"
  681.         Definition
  682.             Origin 0,0
  683.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  684.             Title ""
  685.             DefaultColors 0,1,0
  686.             WindowObjects NONE 
  687.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  688.             VisualEffects NONE ,WAIT 
  689.         EndScript
  690.     EndObject
  691.     AltImageButton "Previous"
  692.         Definition
  693.             Origin 287,176
  694.             Image "CanDo:Brushes/left1.grab"
  695.             AltImage "CanDo:Brushes/left2.grab"
  696.             Shape "CanDo:Brushes/left1.grab"
  697.             ButtonFlags NONE 
  698.         EndScript
  699.         OnRelease
  700.             Let ATTRACTCNT = 0
  701.             PreviousCard
  702.         EndScript
  703.     EndObject
  704.     AltImageButton "Next"
  705.         Definition
  706.             Origin 341,176
  707.             Image "CanDo:Brushes/right1.grab"
  708.             AltImage "CanDo:Brushes/right2.grab"
  709.             Shape "CanDo:Brushes/right1.grab"
  710.             ButtonFlags NONE 
  711.         EndScript
  712.         OnRelease
  713.             Let ATTRACTCNT = 0
  714.             NextCard
  715.         EndScript
  716.     EndObject
  717.     TextButton "Quit"
  718.         Definition
  719.             Origin 70,19
  720.             Font "ruby",12 ; FontName, PointSize
  721.             Style SHADOW ,2,3
  722.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  723.             Text "Quit"
  724.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  725.             Highlight COMPLEMENT 
  726.             ButtonFlags NONE 
  727.         EndScript
  728.         OnRelease
  729.             Quit
  730.         EndScript
  731.     EndObject
  732.     TextField "FIELD#1"
  733.         Definition
  734.             Origin 104,85
  735.             Size 216,8
  736.             Justification LEFT 
  737.             MaxFieldLength 32
  738.             InitialText "Left Justified Text"
  739.             Border EMBOSSED ,7,2 ; BorderStyle, MainPen, ExtraPen
  740.         EndScript
  741.         OnRelease
  742.             SetObjectState "FIELD#2",ON
  743.         EndScript
  744.     EndObject
  745.     TextField "FIELD#2"
  746.         Definition
  747.             Origin 104,110
  748.             Size 216,8
  749.             Justification CENTER 
  750.             MaxFieldLength 32
  751.             InitialText "Centered Text"
  752.             Border EMBOSSED ,7,2 ; BorderStyle, MainPen, ExtraPen
  753.         EndScript
  754.         OnRelease
  755.             SetObjectState "FIELD#3",ON
  756.         EndScript
  757.     EndObject
  758.     TextField "FIELD#3"
  759.         Definition
  760.             Origin 104,135
  761.             Size 216,8
  762.             Justification RIGHT 
  763.             MaxFieldLength 32
  764.             InitialText "Right Justified Text"
  765.             Border EMBOSSED ,7,2 ; BorderStyle, MainPen, ExtraPen
  766.         EndScript
  767.         OnRelease
  768.             SetObjectState "FIELD#4",ON
  769.         EndScript
  770.     EndObject
  771.     IntegerField "FIELD#4"
  772.         Definition
  773.             Origin 400,85
  774.             Size 88,8
  775.             Justification LEFT 
  776.             MaxFieldLength 11
  777.             Limits -2147483647,2147483647
  778.             InitialInteger 12345
  779.             Border EMBOSSED ,7,2 ; BorderStyle, MainPen, ExtraPen
  780.         EndScript
  781.         OnRelease
  782.             SetObjectState "FIELD#5",ON
  783.         EndScript
  784.     EndObject
  785.     IntegerField "FIELD#5"
  786.         Definition
  787.             Origin 400,110
  788.             Size 88,8
  789.             Justification CENTER 
  790.             MaxFieldLength 11
  791.             Limits -2147483647,2147483647
  792.             InitialInteger -500
  793.             Border EMBOSSED ,7,2 ; BorderStyle, MainPen, ExtraPen
  794.         EndScript
  795.         OnRelease
  796.             SetObjectState "FIELD#6",ON
  797.         EndScript
  798.     EndObject
  799.     IntegerField "FIELD#6"
  800.         Definition
  801.             Origin 400,135
  802.             Size 88,8
  803.             Justification RIGHT 
  804.             MaxFieldLength 11
  805.             Limits -2147483647,2147483647
  806.             InitialInteger 1000
  807.             Border EMBOSSED ,7,2 ; BorderStyle, MainPen, ExtraPen
  808.         EndScript
  809.         OnRelease
  810.             SetObjectState "FIELD#1",ON
  811.         EndScript
  812.     EndObject
  813.     IntervalTimer "Attract"
  814.         Definition
  815.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  816.         EndScript
  817.         Occurred
  818.             Let ATTRACTCNT = ATTRACTCNT - 1
  819.             If ATTRACTCNT <= 0
  820.                 NextCard
  821.             EndIf
  822.         EndScript
  823.     EndObject
  824. * End of Card "Fields"
  825. *************
  826.  
  827. *************
  828. * Card "Lists"
  829.     NoAttach
  830.     BeforeAttachment
  831.         MakeDocument "Sound List"
  832.         SetCurrentDirectory "CanDo:Sounds"
  833.         InsertDirectoryList FILESONLY 
  834.         Delete CHARACTER ,-1
  835.     EndScript
  836.     AfterAttachment
  837.         Let ATTRACTCNT = 1
  838.         Do "Print Main Title"," Easily include ""Lists"" in your Application."
  839.         SetPrintStyle SHADOW ,2,3
  840.         SetDrawMode JAM1 
  841.         SetPrintFont "ruby",12
  842.         SetPen 5
  843.         PrintText "This ""List"" allows",350,75
  844.         PrintText "you to select a sound",350,89
  845.         PrintText "and play it.",350,103
  846.         PrintText "",350,117
  847.         PrintText "",350,131
  848.         PrintText "",350,145
  849.         Let THESOUND = ""
  850.         Do "Set TheSound"
  851.     EndScript
  852.     PictureWindow "UserWindow"
  853.         Definition
  854.             Origin 0,0
  855.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  856.             Title ""
  857.             DefaultColors 0,1,0
  858.             WindowObjects NONE 
  859.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  860.             VisualEffects NONE ,WAIT 
  861.         EndScript
  862.     EndObject
  863.     AltImageButton "Previous"
  864.         Definition
  865.             Origin 287,176
  866.             Image "CanDo:Brushes/left1.grab"
  867.             AltImage "CanDo:Brushes/left2.grab"
  868.             Shape "CanDo:Brushes/left1.grab"
  869.             ButtonFlags NONE 
  870.         EndScript
  871.         OnRelease
  872.             Let ATTRACTCNT = 0
  873.             PreviousCard
  874.         EndScript
  875.     EndObject
  876.     AltImageButton "Next"
  877.         Definition
  878.             Origin 341,176
  879.             Image "CanDo:Brushes/right1.grab"
  880.             AltImage "CanDo:Brushes/right2.grab"
  881.             Shape "CanDo:Brushes/right1.grab"
  882.             ButtonFlags NONE 
  883.         EndScript
  884.         OnRelease
  885.             Let ATTRACTCNT = 0
  886.             NextCard
  887.         EndScript
  888.     EndObject
  889.     TextButton "Quit"
  890.         Definition
  891.             Origin 70,19
  892.             Font "ruby",12 ; FontName, PointSize
  893.             Style SHADOW ,2,3
  894.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  895.             Text "Quit"
  896.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  897.             Highlight COMPLEMENT 
  898.             ButtonFlags NONE 
  899.         EndScript
  900.         OnRelease
  901.             Quit
  902.         EndScript
  903.     EndObject
  904.     Disk "USERDISKOBJECT#1"
  905.     EndObject
  906.     AreaButton "Play It"
  907.         Definition
  908.             Origin 127,126
  909.             Size 203,13
  910.             Border SHADOW ,7,2 ; BorderStyle, MainPen, ExtraPen
  911.             Highlight COMPLEMENT 
  912.             ButtonFlags NONE 
  913.         EndScript
  914.         OnClick
  915.             Let ATTRACTCNT = 5
  916.         EndScript
  917.         OnRelease
  918.             Do "Play TheSound"
  919.         EndScript
  920.     EndObject
  921.     List "Sound Lister"
  922.         Definition
  923.             Origin 128,76
  924.             Size 200,44
  925.             Font "topaz",8 ; FontName, PointSize
  926.             Style PLAIN ,2,3
  927.             TextColors 2,7,JAM2  ; PenA, PenB, DrawMode
  928.             Border SHADOW ,7,2 ; BorderStyle, MainPen, ExtraPen
  929.             ListDocument "Sound List" ; where the text comes from
  930.         EndScript
  931.         OnClick
  932.             Let ATTRACTCNT = 15
  933.         EndScript
  934.         OnRelease
  935.             Do "Set TheSound"
  936.         EndScript
  937.         OnDoubleClick
  938.             If THELINE <> NIL
  939.                 Do "Set TheSound"
  940.                 Do "Play TheSound"
  941.             EndIf
  942.         EndScript
  943.     EndObject
  944.     IntervalTimer "Attract"
  945.         Definition
  946.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  947.         EndScript
  948.         Occurred
  949.             Let ATTRACTCNT = ATTRACTCNT - 1
  950.             If ATTRACTCNT <= 0
  951.                 NextCard
  952.             EndIf
  953.         EndScript
  954.     EndObject
  955. * End of Card "Lists"
  956. *************
  957.  
  958. *************
  959. * Card "Print Styles"
  960.     NoAttach
  961.     AfterAttachment
  962.         Do "Print Main Title","      CanDo Has Built-In Print Styles."
  963.         SetPrintFont "ruby",15
  964.         SetPrintStyle PLAIN 
  965.         SetPen 3
  966.         SetDrawMode JAM1 
  967.         Let PRINTX = 100
  968.         Let PRINTY = 77
  969.         Do "PrintNext","Plain  "
  970.         SetPrintStyle BOLD 
  971.         Do "PrintNext","Bold  "
  972.         SetPrintStyle ITALIC 
  973.         Do "PrintNext","Italic  &  "
  974.         SetPrintStyle UNDERLINE 
  975.         Do "PrintNext","Underline"
  976.         Let PRINTX = 100
  977.         Let PRINTY = 100
  978.         SetPrintFont "ruby",15
  979.         SetPrintStyle EMBOSSED ,0,6
  980.         SetPen 3
  981.         Do "PrintNext","Embossed  "
  982.         SetPrintStyle OUTLINE ,2,3
  983.         SetPen 5,1
  984.         Do "PrintNext","Outlined  "
  985.         SetPrintStyle SHADOW ,2,3
  986.         SetPen 4,1
  987.         Do "PrintNext","Shadowed  "
  988.         SetPrintStyle GHOSTED ,1,3
  989.         SetPen 5,1
  990.         Do "PrintNext","Ghosted"
  991.         Let PRINTX = 100
  992.         Let PRINTY = 123
  993.         SetPrintStyle BOLD GHOSTED ,2,3
  994.         SetPen 4,1
  995.         Do "PrintNext","You can mix "
  996.         SetPrintStyle OUTLINE ,2,3
  997.         SetPen 1,1
  998.         Do "PrintNext"," Styles and "
  999.         SetPrintStyle ITALIC EMBOSSED ,2,5
  1000.         SetPen 1,1
  1001.         Do "PrintNext","Colors."
  1002.     EndScript
  1003.     PictureWindow "UserWindow"
  1004.         Definition
  1005.             Origin 0,0
  1006.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  1007.             Title ""
  1008.             DefaultColors 0,1,0
  1009.             WindowObjects NONE 
  1010.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  1011.             VisualEffects NONE ,WAIT 
  1012.         EndScript
  1013.     EndObject
  1014.     AltImageButton "Previous"
  1015.         Definition
  1016.             Origin 287,176
  1017.             Image "CanDo:Brushes/left1.grab"
  1018.             AltImage "CanDo:Brushes/left2.grab"
  1019.             Shape "CanDo:Brushes/left1.grab"
  1020.             ButtonFlags NONE 
  1021.         EndScript
  1022.         OnRelease
  1023.             Let ATTRACTCNT = 0
  1024.             PreviousCard
  1025.         EndScript
  1026.     EndObject
  1027.     AltImageButton "Next"
  1028.         Definition
  1029.             Origin 341,176
  1030.             Image "CanDo:Brushes/right1.grab"
  1031.             AltImage "CanDo:Brushes/right2.grab"
  1032.             Shape "CanDo:Brushes/right1.grab"
  1033.             ButtonFlags NONE 
  1034.         EndScript
  1035.         OnRelease
  1036.             Let ATTRACTCNT = 0
  1037.             NextCard
  1038.         EndScript
  1039.     EndObject
  1040.     TextButton "Quit"
  1041.         Definition
  1042.             Origin 70,19
  1043.             Font "ruby",12 ; FontName, PointSize
  1044.             Style SHADOW ,2,3
  1045.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  1046.             Text "Quit"
  1047.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  1048.             Highlight COMPLEMENT 
  1049.             ButtonFlags NONE 
  1050.         EndScript
  1051.         OnRelease
  1052.             Quit
  1053.         EndScript
  1054.     EndObject
  1055.     Disk "USERDISKOBJECT#1"
  1056.     EndObject
  1057.     OneShotTimer "Attract"
  1058.         Definition
  1059.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  1060.         EndScript
  1061.         Occurred
  1062.             NextCard
  1063.         EndScript
  1064.     EndObject
  1065. * End of Card "Print Styles"
  1066. *************
  1067.  
  1068. *************
  1069. * Card "ToDo"
  1070.     NoAttach
  1071.     BeforeAttachment
  1072.         LoadBrush "CanDo:Brushes/Spiral.grab"
  1073.     EndScript
  1074.     AfterAttachment
  1075.         ShowBrush "CanDo:Brushes/Spiral.grab",310,9
  1076.         SetPrintFont "ruby",15
  1077.         SetPrintStyle SHADOW ,2,3
  1078.         SetPen 3,1
  1079.         SetDrawMode JAM1 
  1080.         PrintText "To Do List!",146,21
  1081.         Let TODOFILE = "CanDo:Text/ToDoList.txt"
  1082.         If EXISTS (TODOFILE)
  1083.             LoadDocument TODOFILE
  1084.         Else
  1085.             MakeDocument TODOFILE
  1086.         EndIf
  1087.         Let PAGEMARK = CHAR(128)
  1088.         Let CURRENTTODOCNT = 1
  1089.         Let CURRENTTODOSTART = 1
  1090.         Do "Get Current ToDo"
  1091.         Let ATTRACTCNT = 1
  1092.     EndScript
  1093.     PictureWindow "UserWindow"
  1094.         Definition
  1095.             Origin 0,0
  1096.             BackgroundImage "CanDo:Images/ToDo.ilbm" ; size and depth comes from image
  1097.             Title ""
  1098.             DefaultColors 0,1,0
  1099.             WindowObjects NONE 
  1100.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  1101.             VisualEffects NONE ,WAIT 
  1102.         EndScript
  1103.     EndObject
  1104.     TextButton "Next Entry"
  1105.         Definition
  1106.             Origin 350,18
  1107.             Font "ruby",12 ; FontName, PointSize
  1108.             Style SHADOW ,2,3
  1109.             TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
  1110.             Text "Next"
  1111.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  1112.             Highlight COMPLEMENT 
  1113.             ButtonFlags NONE 
  1114.         EndScript
  1115.         OnClick
  1116.             Let ATTRACTCNT = 15
  1117.         EndScript
  1118.         OnRelease
  1119.             Do "Get Next ToDo"
  1120.         EndScript
  1121.     EndObject
  1122.     TextButton "Previous Entry"
  1123.         Definition
  1124.             Origin 420,18
  1125.             Font "ruby",12 ; FontName, PointSize
  1126.             Style SHADOW ,2,3
  1127.             TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
  1128.             Text "Previous"
  1129.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  1130.             Highlight COMPLEMENT 
  1131.             ButtonFlags NONE 
  1132.         EndScript
  1133.         OnClick
  1134.             Let ATTRACTCNT = 15
  1135.         EndScript
  1136.         OnRelease
  1137.             If CURRENTTODOCNT <> 1
  1138.                 Do "Replace Current ToDo"
  1139.                 Let TARGETCNT = CURRENTTODOCNT-1
  1140.                 Let CURRENTTODOCNT = 1
  1141.                 Let CURRENTTODOSTART = 1
  1142.                 WorkWithDocument TODOFILE
  1143.                 PositionOnLine 1
  1144.                 While CURRENTTODOCNT < TARGETCNT
  1145.                     Let CURRENTTODOCNT = CURRENTTODOCNT + 1
  1146.                     SearchFor PAGEMARK
  1147.                     If SEARCHFOUND
  1148.                         MoveCursor DOWN 
  1149.                         Let CURRENTTODOSTART = THELINENUMBER
  1150.                     Else
  1151.                         PositionOnLine CURRENTTODOSTART
  1152.                     EndIf
  1153.                 EndLoop
  1154.                 Do "Get Current ToDo"
  1155.             EndIf
  1156.         EndScript
  1157.     EndObject
  1158.     TextButton "New Entry"
  1159.         Definition
  1160.             Origin 520,18
  1161.             Font "ruby",12 ; FontName, PointSize
  1162.             Style SHADOW ,2,3
  1163.             TextColors 3,0,JAM1  ; PenA, PenB, DrawMode
  1164.             Text "New"
  1165.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  1166.             Highlight COMPLEMENT 
  1167.             ButtonFlags NONE 
  1168.         EndScript
  1169.         OnClick
  1170.             Let ATTRACTCNT = 15
  1171.         EndScript
  1172.         OnRelease
  1173.             Do "Get Next ToDo"
  1174.             WorkWithDocument TODOFILE
  1175.             PositionOnLine CURRENTTODOSTART
  1176.             Type PAGEMARK
  1177.             SplitLine
  1178.             MoveCursor UP 
  1179.             SplitLine 1
  1180.             Do "Get Current ToDo"
  1181.         EndScript
  1182.     EndObject
  1183.     Memo "LeftSide"
  1184.         Definition
  1185.             Origin 82,40
  1186.             Size 218,120
  1187.             Font "topaz",8 ; FontName, PointSize
  1188.             Style PLAIN ,2,3
  1189.             TextColors 3,1,JAM2  ; PenA, PenB, DrawMode
  1190.             Border NONE ,1,2 ; BorderStyle, MainPen, ExtraPen
  1191.             MemoDocument "LeftSide" ; where the text comes from
  1192.             ScrollBars NONE 
  1193.             InputStyle NORMAL 
  1194.         EndScript
  1195.         OnClick
  1196.             Let ATTRACTCNT = 15
  1197.         EndScript
  1198.     EndObject
  1199.     AltImageButton "Previous"
  1200.         Definition
  1201.             Origin 287,176
  1202.             Image "CanDo:Brushes/left1.grab"
  1203.             AltImage "CanDo:Brushes/left2.grab"
  1204.             Shape "CanDo:Brushes/left1.grab"
  1205.             ButtonFlags NONE 
  1206.         EndScript
  1207.         OnRelease
  1208.             Let ATTRACTCNT = 0
  1209.             PreviousCard
  1210.         EndScript
  1211.     EndObject
  1212.     AltImageButton "Next"
  1213.         Definition
  1214.             Origin 341,176
  1215.             Image "CanDo:Brushes/right1.grab"
  1216.             AltImage "CanDo:Brushes/right2.grab"
  1217.             Shape "CanDo:Brushes/right1.grab"
  1218.             ButtonFlags NONE 
  1219.         EndScript
  1220.         OnRelease
  1221.             Let ATTRACTCNT = 0
  1222.             NextCard
  1223.         EndScript
  1224.     EndObject
  1225.     TextButton "Quit"
  1226.         Definition
  1227.             Origin 70,19
  1228.             Font "ruby",12 ; FontName, PointSize
  1229.             Style SHADOW ,2,3
  1230.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  1231.             Text "Quit"
  1232.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  1233.             Highlight COMPLEMENT 
  1234.             ButtonFlags NONE 
  1235.         EndScript
  1236.         OnRelease
  1237.             Quit
  1238.         EndScript
  1239.     EndObject
  1240.     Memo "RightSide"
  1241.         Definition
  1242.             Origin 348,40
  1243.             Size 218,120
  1244.             Font "topaz",8 ; FontName, PointSize
  1245.             Style PLAIN ,2,3
  1246.             TextColors 3,1,JAM2  ; PenA, PenB, DrawMode
  1247.             Border NONE ,1,2 ; BorderStyle, MainPen, ExtraPen
  1248.             MemoDocument "RightSide" ; where the text comes from
  1249.             ScrollBars NONE 
  1250.             InputStyle NORMAL 
  1251.         EndScript
  1252.         OnClick
  1253.             Let ATTRACTCNT = 15
  1254.         EndScript
  1255.     EndObject
  1256.     TextMenu "Save"
  1257.         Definition
  1258.             AttachTo MENU ,"Project"
  1259.             Font "ruby",12 ; FontName, PointSize
  1260.             Style PLAIN ,2,3
  1261.             TextColors 3,1,JAM1  ; PenA, PenB, DrawMode
  1262.             Text "Save"
  1263.             MenuFlags NONE 
  1264.             Highlight COMPLEMENT 
  1265.             ShortCutKey "S"
  1266.         EndScript
  1267.         Occurred
  1268.             Let ATTRACTCNT = 15
  1269.             Let SAVEFILE = ASKFORFILENAME(TODOFILE,"Select FileName To Save into. ")
  1270.             If SAVEFILE <> ""
  1271.                 Do "Replace Current ToDo"
  1272.                 If SAVEFILE <> TODOFILE
  1273.                     MakeDocument SAVEFILE
  1274.                     InsertDocument TODOFILE,1,MAXINTEGER
  1275.                     Flush TODOFILE
  1276.                     Let TODOFILE = SAVEFILE
  1277.                 EndIf
  1278.                 SaveDocument TODOFILE
  1279.             EndIf
  1280.         EndScript
  1281.     EndObject
  1282.     TextMenu "Load"
  1283.         Definition
  1284.             AttachTo MENU ,"Project"
  1285.             Font "ruby",12 ; FontName, PointSize
  1286.             Style PLAIN ,2,3
  1287.             TextColors 3,1,JAM1  ; PenA, PenB, DrawMode
  1288.             Text "Load"
  1289.             MenuFlags NONE 
  1290.             Highlight COMPLEMENT 
  1291.             ShortCutKey "L"
  1292.         EndScript
  1293.         Occurred
  1294.             Let ATTRACTCNT = 15
  1295.             Loop
  1296.                 Let NEWFILE = ASKFORFILENAME(TODOFILE,"Select File To Load          ")
  1297.             Until EXISTS(NEWFILE) OR (NEWFILE = "")
  1298.             If NEWFILE <> ""
  1299.                 Flush TODOFILE
  1300.                 Let TODOFILE = NEWFILE
  1301.                 LoadDocument TODOFILE
  1302.                 IfError
  1303.                 EndIf
  1304.                 Let CURRENTTODOCNT = 1
  1305.                 Let CURRENTTODOSTART = 1
  1306.                 Do "Get Current ToDo"
  1307.             EndIf
  1308.         EndScript
  1309.     EndObject
  1310.     IntervalTimer "Attract"
  1311.         Definition
  1312.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  1313.         EndScript
  1314.         Occurred
  1315.             Let ATTRACTCNT = ATTRACTCNT - 1
  1316.             If ATTRACTCNT <= 0
  1317.                 NextCard
  1318.             EndIf
  1319.         EndScript
  1320.     EndObject
  1321. * End of Card "ToDo"
  1322. *************
  1323.  
  1324. *************
  1325. * Card "What Is CanDo"
  1326.     NoAttach
  1327.     BeforeAttachment
  1328.         LoadDocument "CanDo:Text/WhatIsCanDo.txt","Work"
  1329.     EndScript
  1330.     AfterAttachment
  1331.         Let ATTRACTCNT = 1
  1332.         Do "Print Message",MSGCNT
  1333.     EndScript
  1334.     PictureWindow "UserWindow"
  1335.         Definition
  1336.             Origin 0,0
  1337.             BackgroundImage "CanDo:Images/WICDtitle.ilbm" ; size and depth comes from image
  1338.             Title ""
  1339.             DefaultColors 0,1,0
  1340.             WindowObjects NONE 
  1341.             WindowFlags ACTIVATE BORDERLESS SEPARATESCREEN TOFRONT 
  1342.             VisualEffects NONE ,WAIT 
  1343.         EndScript
  1344.     EndObject
  1345.     AltImageButton "Next"
  1346.         Definition
  1347.             Origin 341,176
  1348.             Image "CanDo:Brushes/right1.grab"
  1349.             AltImage "CanDo:Brushes/right2.grab"
  1350.             Shape "CanDo:Brushes/right1.grab"
  1351.             ButtonFlags NONE 
  1352.         EndScript
  1353.         OnRelease
  1354.             Let ATTRACTCNT = 0
  1355.             Do "Next Msg"
  1356.         EndScript
  1357.     EndObject
  1358.     IntervalTimer "Auto Advance"
  1359.         Definition
  1360.             Duration 0,20,0 ; Minutes, Seconds, Jiffies
  1361.         EndScript
  1362.         Occurred
  1363.             If ATTRACTCNT < 1
  1364.                 Let ATTRACTCNT = ATTRACTCNT + 1
  1365.             Else
  1366.                 Do "Next Msg"
  1367.             EndIf
  1368.         EndScript
  1369.     EndObject
  1370.     TextButton "Quit"
  1371.         Definition
  1372.             Origin 70,19
  1373.             Font "ruby",12 ; FontName, PointSize
  1374.             Style SHADOW ,2,3
  1375.             TextColors 4,0,JAM1  ; PenA, PenB, DrawMode
  1376.             Text "Quit"
  1377.             Border SHADOW ,3,2 ; BorderStyle, MainPen, ExtraPen
  1378.             Highlight COMPLEMENT 
  1379.             ButtonFlags NONE 
  1380.         EndScript
  1381.         OnRelease
  1382.             Quit
  1383.         EndScript
  1384.     EndObject
  1385.     AltImageButton "Previous"
  1386.         Definition
  1387.             Origin 287,176
  1388.             Image "CanDo:Brushes/left1.grab"
  1389.             AltImage "CanDo:Brushes/left2.grab"
  1390.             Shape "CanDo:Brushes/left1.grab"
  1391.             ButtonFlags NONE 
  1392.         EndScript
  1393.         OnRelease
  1394.             Let ATTRACTCNT = 0
  1395.             If MSGCNT <> 0
  1396.                 Let MSGCNT = MSGCNT - 1
  1397.                 Do "Print Message",MSGCNT
  1398.             Else
  1399.                 PreviousCard
  1400.             EndIf
  1401.         EndScript
  1402.     EndObject
  1403. * End of Card "What Is CanDo"
  1404. *************
  1405.  
  1406. *************
  1407. * Global routine "Get Current ToDo"
  1408.     Do "Get Current ToDo Lines"
  1409.     WorkWithDocument "RightSide"
  1410.     Clear DOCUMENT 
  1411.     WorkWithDocument "LeftSide"
  1412.     Clear DOCUMENT 
  1413.     InsertDocument TODOFILE,CURRENTTODOSTART,MIN(15,CURRENTTODOLINES)
  1414.     If CURRENTTODOLINES > 15
  1415.         WorkWithDocument "RightSide"
  1416.         InsertDocument TODOFILE,CURRENTTODOSTART+15,CURRENTTODOLINES-15
  1417.     EndIf
  1418.     Do "Print ToDo Number"
  1419. * End of routine "Get Current ToDo"
  1420. *************
  1421.  
  1422. *************
  1423. * Global routine "Get Current ToDo Lines"
  1424.     Let CURRENTTODOSTART = MAX(1,CURRENTTODOSTART)
  1425.     WorkWithDocument TODOFILE
  1426.     PositionOnLine CURRENTTODOSTART
  1427.     SearchFor PAGEMARK
  1428.     If NOT SEARCHFOUND
  1429.         MoveCursorTo ENDOF DOCUMENT 
  1430.     Else
  1431.         MoveCursor UP ,1
  1432.     EndIf
  1433.     Let CURRENTTODOLINES = THELINENUMBER - CURRENTTODOSTART + 1
  1434.     PositionOnLine CURRENTTODOSTART
  1435. * End of routine "Get Current ToDo Lines"
  1436. *************
  1437.  
  1438. *************
  1439. * Global routine "Get Next ToDo"
  1440.     Do "Replace Current ToDo"
  1441.     SearchFor PAGEMARK
  1442.     If SEARCHFOUND
  1443.         MoveCursor DOWN 
  1444.         Let CURRENTTODOCNT = CURRENTTODOCNT + 1
  1445.         Let CURRENTTODOSTART = THELINENUMBER
  1446.         Do "Get Current ToDo"
  1447.     Else
  1448.         PositionOnLine CURRENTTODOSTART
  1449.     EndIf
  1450. * End of routine "Get Next ToDo"
  1451. *************
  1452.  
  1453. *************
  1454. * Global routine "Next Msg"
  1455.     If MSGCNT < 7
  1456.         Let MSGCNT = MSGCNT + 1
  1457.         Do "Print Message",MSGCNT
  1458.     Else
  1459.         NextCard
  1460.     EndIf
  1461. * End of routine "Next Msg"
  1462. *************
  1463.  
  1464. *************
  1465. * Global routine "Play TheSound"
  1466.     Let WORKSOUND = "CanDo:Sounds/" || THESOUND
  1467.     If EXISTS (WORKSOUND)
  1468.         If FILETYPE(WORKSOUND) = "Sound"
  1469.             PlaySound WORKSOUND
  1470.             Flush WORKSOUND
  1471.         EndIf
  1472.     EndIf
  1473. * End of routine "Play TheSound"
  1474. *************
  1475.  
  1476. *************
  1477. * Global routine "Print Main Title"
  1478.     SetPrintFont "ruby",15
  1479.     SetPrintStyle SHADOW ,2,3
  1480.     SetPen 3
  1481.     SetDrawMode JAM1 
  1482.     PrintText ARG1,86,48
  1483. * End of routine "Print Main Title"
  1484. *************
  1485.  
  1486. *************
  1487. * Global routine "Print Message"
  1488.     PositionOnLine ARG1*8+1
  1489.     SetPen 1
  1490.     AreaRectangle 57,45,533,112
  1491.     SetPrintFont "ruby",15
  1492.     SetPrintStyle SHADOW ,2,3
  1493.     SetPen 3
  1494.     SetDrawMode JAM1 
  1495.     PrintText THELINE,86,48
  1496.     SetPrintFont "ruby",12
  1497.     SetPen 5
  1498.     MoveCursor DOWN 
  1499.     PrintText THELINE,86,70
  1500.     MoveCursor DOWN 
  1501.     PrintText THELINE,86,84
  1502.     MoveCursor DOWN 
  1503.     PrintText THELINE,86,98
  1504.     MoveCursor DOWN 
  1505.     PrintText THELINE,86,112
  1506.     MoveCursor DOWN 
  1507.     PrintText THELINE,86,126
  1508.     MoveCursor DOWN 
  1509.     PrintText THELINE,86,140
  1510. * End of routine "Print Message"
  1511. *************
  1512.  
  1513. *************
  1514. * Global routine "Print ToDo Number"
  1515.     SetPrintFont "ruby",12
  1516.     SetPrintStyle PLAIN ,2,3
  1517.     SetPen 3,0
  1518.     SetDrawMode JAM2 
  1519.     PrintText "Page Number " || CURRENTTODOCNT || "    ",416,174
  1520. * End of routine "Print ToDo Number"
  1521. *************
  1522.  
  1523. *************
  1524. * Global routine "Print TwoTone"
  1525.     SetPrintFont "ruby",12
  1526.     SetPrintStyle SHADOW ,2,3
  1527.     GetTextDimensions ARG1,WIDTH,HEIGHT
  1528.     SetPen ARG2
  1529.     PrintText ARG1,ARG5,ARG6
  1530.     SetPen ARG4
  1531.     PrintText ARG3,ARG5+WIDTH,ARG6
  1532. * End of routine "Print TwoTone"
  1533. *************
  1534.  
  1535. *************
  1536. * Global routine "PrintNext"
  1537.     GetTextDimensions ARG1,PRINTW,PRINTH
  1538.     PrintText ARG1,PRINTX,PRINTY
  1539.     Let PRINTX = PRINTX + PRINTW
  1540. * End of routine "PrintNext"
  1541. *************
  1542.  
  1543. *************
  1544. * Global routine "Replace Current ToDo"
  1545.     WorkWithDocument "LeftSide"
  1546.     Let LEFTSIDELINES = LINESINDOCUMENT
  1547.     WorkWithDocument "RightSide"
  1548.     Let RIGHTSIDELINES = LINESINDOCUMENT
  1549.     Let RIGHTSIDESIZE = SIZEOFDOCUMENT
  1550.     Do "Get Current ToDo Lines"
  1551.     Let CNT = 1
  1552.     While CNT <= CURRENTTODOLINES+1
  1553.         Delete LINE 
  1554.         Let CNT = CNT + 1
  1555.     EndLoop
  1556.     InsertDocument "LeftSide",1,LEFTSIDELINES
  1557.     SplitLine
  1558.     If RIGHTSIDESIZE <> 1
  1559.         InsertDocument "RightSide",1,RIGHTSIDELINES
  1560.         SplitLine
  1561.     EndIf
  1562.     Type PAGEMARK
  1563.     SplitLine
  1564.     PositionOnLine CURRENTTODOSTART
  1565. * End of routine "Replace Current ToDo"
  1566. *************
  1567.  
  1568. *************
  1569. * Global routine "Set TheSound"
  1570.     If THELINE <> "" AND THELINE <> THESOUND
  1571.         Let THESOUND = THELINE
  1572.         SetPrintFont "topaz",11
  1573.         SetPrintStyle OUTLINE ,2,3
  1574.         SetDrawMode JAM1 
  1575.         SetPen 7
  1576.         AreaRectangle 127,126,204,13
  1577.         SetPen 4
  1578.         PrintText THESOUND,128,126
  1579.     EndIf
  1580. * End of routine "Set TheSound"
  1581. *************
  1582.  
  1583.