home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 March / Chip_2002-03_cd1.bin / sharewar / winbatch / winbatch.exe / boxdemo.wb_ < prev    next >
Encoding:
Text File  |  1999-10-08  |  18.8 KB  |  595 lines

  1. ;;;;;;;;;;;;;;;; Generic Initialization ;;;;;;;;;;;;;;;;;;;;
  2. IntControl(1008,1,0,0,0)
  3. IntControl(12,5,0,0,0)
  4. ;;;;;;;; Assorted Colors ;;;;;;;;;
  5. DKBLUE="0,0,128"
  6. BLUE="0,0,255"
  7. LTGRAY="192,192,192"
  8. GRAY="128,128,128"
  9. DKGRAY="64,64,64"
  10. GREEN="0,255,0"
  11. RED="255,0,0"
  12. BLACK="0,0,0"
  13. WHITE="255,255,255"
  14. YELLOW="255,255,0"
  15.  
  16.  
  17. ;;;;;  Generic code for drawing a box and  adding text to it.
  18.  
  19.         ;Get title on screen
  20.              ;wbid = 99
  21.              ;BoxNew(wbid,rectTitle,1)
  22.              ;BoxColor(wbid,BLACK,0)
  23.              ;BoxDrawRect(wbid,"0,0,1000,1000",2)
  24.              ;BoxTextFont(wbid,"Arial",TitleHeight,170,0)   ; san-srif, ariel, size 20, bold, noitalic
  25.              ;BoxTextColor(wbid,RED)
  26.              ;BoxDrawText(wbid,rectTitleText,"Acme Aardvarks",0,32)
  27.  
  28. ;;;;;;;;;;;; This Example  ;;;;;;;;;;;;;;;;;;;;;;;;;
  29. ;;;;;;;;; Drawing the Main Box ;;;;;;;;
  30. ;; Note the use of while 1. This use of while maintains
  31. ;; the boxes until a user clicks on a button and exits 
  32. ;; the while construction
  33. BoxesUp("100,100,900,900",@NORMAL)
  34.  
  35. while 1
  36.  
  37.    BoxColor(1,"0,0,128",4)
  38.    BoxCaption(1,"Graphical WinBatch")
  39. ;; Note: Here we specify 8 buttons numbered 1 to 8.
  40. ;; You can change this. Edit the list of buttons here,
  41. ;; go to the "Select a button" routine and add or subtract
  42. ;; your button selection information. Then create a subroutine
  43. ;; at the end of this script to do what you need done when
  44. ;; the button is pushed. There is a sample for you to use.
  45.  
  46.    bExit=1   
  47.    bHelp=2
  48.  
  49.    bTherm=3
  50.    bDots=4   
  51.    bBoxes=5
  52.    bLines=6
  53.    bDraw=7
  54.    bText=8
  55.    bEmpty=9
  56.  
  57.    BoxDrawRect(1,"0,0,1000,1000",2)
  58.  
  59.    BoxTextFont(1,"Times",150,80,0|0)
  60.    BoxTextColor(1,"255,255,0")
  61.    BoxDrawText(1,"325,550,1000,1000","Pick a Demo",0,0);;;
  62.  
  63. ;;;;; This section creates the fancy banner headline in a box
  64.                rectNote="100,30,900,270"
  65.                NoteHeight=400
  66.                rectNoteText="70,200,950,800"
  67.                
  68.                rectnoteline1="0,0,1000,0"
  69.                rectNoteline2="1000,1000,1000,0"
  70.                rectNoteLine3="0,1000,1000,1000"
  71.                rectNoteLine4="0,0,0,1000"
  72.                notepenwidth=20
  73.                rectnoteline1b="40,150,960,150"
  74.                rectNoteline2b="960,840,960,150"
  75.                rectNoteLine3b="40,840,960,840"
  76.                rectNoteLine4b="40,150,40,840"
  77.                notepenwidthb=10
  78.                wbid=2
  79.                Thermid=3
  80.                Noteid=4
  81.         BoxNew(Noteid,rectNote,1)
  82.         BoxColor(Noteid,LTGRAY,0)       ; Light Gray no gradient
  83.         BoxDrawRect(Noteid,"",2)
  84. ;;;;;  --------- This line changes the headline font -----------------        
  85.         BoxTextFont(Noteid,"Arial",NoteHeight,170,0)
  86.         BoxTextColor(Noteid,RED)
  87.         
  88.         BoxPen(Noteid,WHITE,notepenwidth)
  89.         boxdrawline(Noteid,rectNoteLine1)
  90.         boxdrawline(Noteid,rectNoteLine4)
  91.         BoxPen(Noteid,GRAY,notepenwidth)
  92.         boxdrawline(Noteid,rectNoteLine2)
  93.         boxdrawline(Noteid,rectNoteLine3)
  94.         BoxPen(Noteid,WHITE,notepenwidthb)
  95.         boxdrawline(Noteid,rectNoteLine2b)
  96.         boxdrawline(Noteid,rectNoteLine3b)
  97.         BoxPen(Noteid,GRAY,notepenwidthb)
  98.         boxdrawline(Noteid,rectNoteLine1b)
  99.         boxdrawline(Noteid,rectNoteLine4b)
  100.         
  101.         ;BoxDataTag(Noteid,"NOTE")
  102.  
  103.         ;   BoxDataClear(NoteId,"NOTE")
  104.  
  105.  
  106. ;;;;;  ----------- The BoxDrawText  line creates the headline text. Copy (don't move)
  107. ;;;;; this line anywhere in this script you need to change the headline text.
  108.  
  109.  
  110.  
  111.            BoxDrawText(Noteid,rectNoteText,"WinBatch Graphics",1,4)
  112.  
  113.  
  114.    BoxButtonDraw(1,bTherm,   "&Progress",  "100,320,250,390")
  115.    BoxButtonDraw(1,bDots,    "&Dots",  "100,410,250,480")    
  116.    BoxButtonDraw(1,bBoxes,   "&Boxes", "100,500,250,570")    
  117.    BoxButtonDraw(1,bLines,   "&Lines", "100,590,250,660")    
  118.    BoxButtonDraw(1,bDraw,    "&Draw",  "100,680,250,750")                                                                                
  119.    BoxButtonDraw(1,bText,    "&Text",  "100,770,250,840")    
  120.    BoxButtonDraw(1,bEmpty,  "&Spare", "100,860,250,930")           
  121.    BoxButtonDraw(1,bHelp,    "&Help",  "550,860,700,930")  
  122.    BoxButtonDraw(1,bExit,    "E&xit",  "750,860,900,930")    
  123.  
  124.    
  125.    iBox=0
  126.    BoxButtonWait()
  127.    while iBox==0
  128.       for x=1 to 9
  129.          if BoxButtonStat(1,x) then iBox=x
  130.       next
  131.    end while
  132.  
  133.  
  134. ;;; Select a button  ;;;;
  135.     
  136.    if iBox
  137.       BoxDataClear(1,"TOP")
  138.       switch iBox
  139.          case bDraw
  140.             gosub DoDraw
  141.             break
  142.          case bLines
  143.             gosub DoLines
  144.             break
  145.          case bBoxes
  146.             gosub DoBoxes
  147.             break
  148.          case bDots
  149.             gosub DoDots
  150.             break
  151.          case bExit
  152.             exit
  153.             break
  154.          case bText
  155.             gosub DoText
  156.             break
  157.          case bTherm
  158.             gosub DoTherm
  159.             break
  160.          case bHelp
  161.             gosub DoHelp
  162.             break
  163.          case bEmpty
  164.             gosub Empty
  165.             break
  166.       end switch
  167.  
  168.    endif
  169. end while
  170. exit
  171. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  172. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  173. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  174. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  175.  
  176. :DODRAW
  177.      BoxCaption(1,"Scribble")
  178.      BoxNew(2,"0,0,1000,1000",0)
  179.      BoxPen(2,RED,1)
  180.         BoxButtonDraw(2,bExit,    "E&xit",  "750,860,900,930") ;mw991008
  181.      BoxDataTag(2,"FRED")
  182.      Exclusive(@ON)
  183.      olda="500,500"
  184.      while 1
  185.         BoxDataClear(2,"FRED")
  186.         a=MouseInfo(6)
  187.         a=strreplace(a," ",",")
  188.         BoxDrawLine(2,"%olda%,%a%")
  189.         olda=a
  190.         if BoxButtonStat(2,bExit)==1 then break  ; mw991008
  191.      endwhile
  192.      BoxDestroy(2)
  193. Return
  194.  
  195. :DOLINES
  196.      BoxCaption(1,"That Old Line")
  197.      BoxNew(2,"0,0,1000,1000",0)
  198.      BoxColor(2,BLACK,0)
  199.      BoxDrawRect(2,"0,0,1000,1000",2)
  200.      BoxButtonDraw(2,bExit,    "E&xit",  "750,860,900,930")  ;mw991008
  201.      BoxDataTag(2,"APPLE")
  202.      
  203.      p1=200
  204.      p2=200
  205.      p3=400
  206.      p4=400
  207.      
  208.      v1=10
  209.      v2=-20
  210.      v3=-5
  211.      v4=15
  212.      
  213.      bb=1
  214.      ErrorMode(@OFF)
  215.      while 1
  216.         if BoxButtonStat(2,bExit)==1 then break    ; mw990108
  217.         if LastError()==10108
  218.            BoxDataClear(2,"APPLE")
  219.            BoxPen(2,"%r%,%g%,%b%",1)
  220.         endif
  221.         if bb==1
  222.            BoxDataClear(2,"APPLE")
  223.            gosub randcolor
  224.            BoxPen(2,"%r%,%g%,%b%",1)
  225.            bb=0
  226.         endif
  227.         BoxDrawLine(2,"%p1%,%p2%,%p3%,%p4%")
  228.         bb=0
  229.         for q=1 to 4
  230.             p%q%=p%q%+v%q%
  231.             if p%q% <= 0
  232.                p%q%=0
  233.                v%q%=Int(Random(10))+1
  234.                bb=1
  235.             endif
  236.             if p%q% >= 1000
  237.                p%q%=1000
  238.                v%q%=-Int(Random(10))-1
  239.                bb=1
  240.             endif
  241.         next
  242.      endwhile
  243.      BoxDestroy(2)
  244. Return
  245.  
  246. :DOBOXES
  247.      BoxCaption(1,"Random Rectangles")
  248.      BoxNew(2,"0,0,1000,1000",0)
  249.      BoxButtonDraw(2,bExit,    "E&xit",  "750,860,900,930") ; mw991008
  250.      BoxDataTag(2,"ACORN")
  251.      ErrorMode(@OFF)
  252.      while 1
  253.         if BoxButtonStat(2,bExit)==1 then break  ; mw991008
  254.         x=Random(1000)
  255.         y=Random(1000)
  256.         s=Random(1000)
  257.         t=Random(1000)
  258.         r=Random(255)
  259.         g=Random(255)
  260.         b=Random(255)
  261.         BoxColor(2,"%r%,%g%,%b%",0)
  262.         BoxDrawRect(2,"%x%,%y%,%s%,%t%",2) 
  263.         if LastError()==10108
  264.             BoxDataClear(2,"ACORN")
  265.             BoxUpdates(1,3)
  266.         endif
  267.      endwhile
  268.      ErrorMode(@CANCEL)
  269.      BoxDestroy(2)
  270. Return
  271.  
  272. :DODOTS
  273.      BoxCaption(1,"Driving Me Dotty")
  274.      BoxNew(2,"0,0,1000,1000",0)
  275.      BoxButtonDraw(2,bExit,    "E&xit",  "750,860,900,930") ;mw991008
  276.      BoxColor(2,BLACK,0)
  277.      BoxDrawRect(2,"0,0,1000,1000",2)
  278.      brk=0
  279.      x=500
  280.      y=500
  281.      oldxx=0
  282.      oldyy=0
  283.      z=5
  284.      z2=10
  285.      BoxDataTag(2,"SAM")
  286.      while 1
  287.         BoxDataClear(2,"SAM")
  288.         gosub RandColor
  289.         BoxColor(2,"%r%,%g%,%b%",0)
  290.         for q=1 to 100
  291.           x1=x-z
  292.           x2=x+z
  293.           y1=y-z
  294.           y2=y+z
  295.           BoxDrawCircle(2,"%x1%,%y1%,%x2%,%y2%",2)
  296.           ww=Int(Random(100))
  297.           if ww>16
  298.              xx=oldxx
  299.              yy=oldyy
  300.           else
  301.              xx=ww&3
  302.              if xx==3 then xx=0
  303.              yy=(ww&12)>>2
  304.              if yy==3 then yy=0
  305.           endif
  306.           
  307.           if x<=0 then xx=2
  308.           if x>=1000 then xx=1
  309.           if y<=0 then yy=2
  310.           if y>=1000 then yy=1
  311.           oldxx=xx
  312.           oldyy=yy
  313.           if xx==2 then x=x+z2
  314.           if xx==1 then x=x-z2
  315.           if yy==2 then y=y+z2
  316.           if yy==1 then y=y-z2
  317.         if BoxButtonStat(2,bExit)==1    ;mw991008
  318.            brk=1
  319.            break
  320.         endif
  321.         next
  322.         if brk==1 then break
  323.      endwhile
  324.      BoxDestroy(2)
  325. Return
  326.  
  327. :DOTEXT
  328.         BoxCaption(1,"Fontopia")
  329.         BoxNew(2,"0,0,1000,500",0)
  330.         BoxColor(2,LTGRAY,2)
  331.         BoxColor(1,LTGRAY,0)
  332.         BoxButtonDraw(2,bExit,"E&xit","750,860,900,930")   ; mw991008
  333.         BoxDrawRect(2,"0,0,1000,1000",2)
  334.         BoxDrawRect(1,"0,500,1000,1000",2)
  335.         words="The quick brown fox went happy stroll dark woods looking for something tasty dinner soon found picnic basket full yummy goodies "
  336.         wc=ItemCount(words," ")
  337.         BoxTextColor(1,BLACK)
  338.          ;;;;;;;;;
  339.         BoxTextFont(1,"",20,0,0)
  340.         BoxTextColor(1,RED)
  341.         BoxDrawText(1,"25,510,1000,545","Results shown will vary with installed fonts...",0,0)
  342.         BoxTextColor(1,BLACK)
  343.         fonttype=0
  344.         xxx=25
  345.         yyy=xxx+225
  346.         BoxTextFont(1,"",30,fonttype,0)
  347.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Normal",0,0)
  348.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  349.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  350.         BoxTextFont(1,"Arial",30,fonttype,8)
  351.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  352.         BoxTextFont(1,"Modern",30,fonttype,12)
  353.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  354.         BoxTextFont(1,"Script",30,fonttype,16)
  355.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  356.         BoxTextFont(1,"Old English Text MT",30,fonttype,22)
  357.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  358.         fonttype=100
  359.         xxx=275
  360.         yyy=xxx+225
  361.         BoxTextFont(1,"",30,fonttype,0)
  362.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Italic",0,0)
  363.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  364.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  365.         BoxTextFont(1,"Arial",30,fonttype,8)
  366.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  367.         BoxTextFont(1,"Modern",30,fonttype,12)
  368.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  369.         BoxTextFont(1,"Script",30,fonttype,16)
  370.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  371.         BoxTextFont(1,"Old English Text MT",30,fonttype,20)
  372.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  373.         fonttype=70
  374.         xxx=525
  375.         yyy=xxx+225
  376.         BoxTextFont(1,"",30,fonttype,0)
  377.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Bold",0,0)
  378.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  379.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  380.         BoxTextFont(1,"Arial",30,fonttype,8)
  381.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  382.         BoxTextFont(1,"Modern",30,fonttype,12)
  383.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  384.         BoxTextFont(1,"Script",30,fonttype,16)
  385.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  386.         BoxTextFont(1,"Old English Text MT",30,fonttype,20)
  387.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  388.         fonttype=170
  389.         xxx=775
  390.         yyy=xxx+225
  391.         BoxTextFont(1,"",30,fonttype,0)
  392.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Bold Italic",0,0)
  393.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  394.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  395.         BoxTextFont(1,"Arial",30,fonttype,8)
  396.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  397.         BoxTextFont(1,"Modern",30,fonttype,12)
  398.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  399.         BoxTextFont(1,"Script",30,fonttype,16)
  400.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  401.         BoxTextFont(1,"Old English Text MT",30,fonttype,20)
  402.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  403.         
  404.         
  405.         BoxDataTag(2,"PEACHY")
  406.         brk=0
  407.         cnt=0
  408.         wash=0
  409.         while 1
  410.            for i=1 to wc
  411.                 cnt=cnt+1
  412.                 gosub randcolor
  413.                 BoxTextColor(2,"%r%,%g%,%b%")
  414.                 x=Random(800)
  415.                 y=Random(800)
  416.                 s=x+Random(200)
  417.                 t=y+Random(200)
  418.                 fontsize=max(10,min(t-y,Random(200)))
  419.                 BoxTextFont(2, "", fontsize, 10+Random(80)+ (100*Int(Random(1))), (Int(Random(4)+1)*4 ))
  420.                 BoxDrawText(2,"%x%,%y%,%s%,%t%",ItemExtract(i,words," "),0,0)
  421.                 if BoxButtonStat(2,bExit)   ;mw991008
  422.                     brk=1
  423.                     break
  424.                 endif
  425.                 if cnt==200
  426.                    cnt=0
  427.                    wash=wash+1
  428.                    if wash==8 then wash=0
  429.                    BoxColor(2,"%r%,%g%,%b%",wash)
  430.                    BoxDrawRect(2,"0,0,1000,1000",2)
  431.                 endif
  432.            next i
  433.            BoxDataClear(2,"PEACHY")
  434.            if brk then break
  435.         endwhile
  436.         BoxDestroy(2)
  437. Return
  438.  
  439. :DOTHERM
  440.  
  441.      rectutext="100,100,1000,900"
  442.      rectTherm="200,350,800,650"
  443.      rectButton="0,0,100,100"
  444.      rectThermLine1="100,550,900,550"
  445.      rectThermLine2="900,550,900,800"
  446.      rectThermLine3="900,800,100,800"
  447.      rectThermLine4="100,800,100,550"
  448.      ThermPenWidth=20
  449.      rectThermText1="100,50,1000,199"
  450.      rectThermPercent="490,625,550,725"
  451.      rectTopHalf="0,0,1000,210"
  452.      rectBotHalf="0,210,1000,1000" 
  453.      rectTitle="100,20,900,170"
  454.      rectTitleText="10,10,790,140"
  455.      TitleHeight=950
  456.      rectNote="100,30,900,270"
  457.      NoteHeight=400
  458.      rectNoteText="70,200,950,800"
  459.      
  460.      rectnoteline1="0,0,1000,0"
  461.      rectNoteline2="1000,1000,1000,0"
  462.      rectNoteLine3="0,1000,1000,1000"
  463.      rectNoteLine4="0,0,0,1000"
  464.      notepenwidth=20
  465.      rectnoteline1b="40,150,960,150"
  466.      rectNoteline2b="960,840,960,150"
  467.      rectNoteLine3b="40,840,960,840"
  468.      rectNoteLine4b="40,150,40,840"
  469.      notepenwidthb=10
  470.      Thermid=3
  471.      Noteid=4
  472.              ; Make main window look nice
  473.              BoxColor(1,"128,0,0",1)
  474.              BoxDrawRect(1,"0,0,1000,1000",2)
  475.              BoxCaption(1,"Are we making any progress here?")
  476.              
  477.  
  478.              
  479.    ;;;;Do note box
  480.              BoxNew(Noteid,rectNote,1)
  481.              BoxColor(Noteid,LTGRAY,0)       ; Light Gray no gradient
  482.              BoxDrawRect(Noteid,"",2)
  483.              
  484.              BoxTextFont(Noteid,"Arial",NoteHeight,170,0)
  485.              BoxTextColor(Noteid,RED)
  486.              
  487.              BoxPen(Noteid,WHITE,notepenwidth)
  488.              boxdrawline(Noteid,rectNoteLine1)
  489.              boxdrawline(Noteid,rectNoteLine4)
  490.              BoxPen(Noteid,GRAY,notepenwidth)
  491.              boxdrawline(Noteid,rectNoteLine2)
  492.              boxdrawline(Noteid,rectNoteLine3)
  493.              BoxPen(Noteid,WHITE,notepenwidthb)
  494.              boxdrawline(Noteid,rectNoteLine2b)
  495.              boxdrawline(Noteid,rectNoteLine3b)
  496.              BoxPen(Noteid,GRAY,notepenwidthb)
  497.              boxdrawline(Noteid,rectNoteLine1b)
  498.              boxdrawline(Noteid,rectNoteLine4b)
  499.              
  500.              BoxDataTag(Noteid,"NOTE")
  501.              BoxDrawText(Noteid,rectNoteText,"Initializing...",1,4)
  502.              
  503.              
  504.              
  505.              ;Draw thermoneter outline
  506.              BoxNew(Thermid,rectTherm,2)
  507.              BoxUpdates(Thermid,0)
  508.              BoxCaption(Thermid,"Name Goes Here")
  509.              BoxColor(Thermid,LTGRAY,0)
  510.              BoxDrawRect(Thermid,"",2)
  511.              ; Draw updating thermometer here
  512.              ; there are 3 virtual pixels per percent
  513.              ; we have to draw 3 boxes and some text...
  514.              BoxDataTag(Thermid,"FRED")
  515.              BoxCaption(Thermid,"Please wait. Stepping through example...")
  516.              
  517.              FilesToCopy=16
  518.              FilesCopied=0
  519.              
  520.              for FilesCopied=1 to FilesToCopy
  521.                 BoxDataClear(Thermid,"FRED")
  522.                 BoxUpdates(Thermid,0)
  523.                 BoxColor(Thermid,GREEN,0)
  524.                 xxx= 100+((800*FilesCopied)/FilesToCopy)
  525.                 per=(100.0*FilesCopied)/FilesToCopy
  526.                 per=Int(per)
  527.                 BoxDrawRect(Thermid,"104,554,%xxx%,796",2)
  528.                 BoxColor(Thermid,GRAY,0)
  529.                 BoxDrawRect(Thermid,"%xxx%,554,896,796",2)
  530.                 BoxPen(Thermid,BLACK,ThermPenWidth)
  531.                 boxdrawline(Thermid,rectThermLine1)
  532.                 boxdrawline(Thermid,rectThermLine2)
  533.                 boxdrawline(Thermid,rectThermLine3)
  534.                 boxdrawline(Thermid,rectThermLine4)
  535.                 
  536.                 if per<50 then BoxTextColor(Thermid,WHITE)
  537.                 BoxDrawText(Thermid,rectThermPercent,"%per%%%",0,0)
  538.                 BoxTextColor(Thermid,BLACK)
  539.                 BoxColor(Thermid,LTGRAY,0)
  540.                 BoxDrawText(Thermid,rectThermText1,"Steps completed: %FilesCopied%",1,0)
  541.                 BoxDataClear(NoteId,"NOTE");;;
  542.                 BoxDrawText(Noteid,rectNoteText,"Showing Progress",1,4);;;
  543.                 BoxUpdates(Thermid,2)
  544.                 TimeDelay(Random(1.0))   ;Fake passage of time
  545.              next
  546.              BoxTextColor(Noteid,GREEN)        
  547.              BoxDrawText(Noteid,rectNoteText,"Example Complete",1,4)        
  548.              Message("Company Name Goes Here","Example Complete!!")
  549.              BoxDestroy(Thermid)
  550.              BoxDestroy(Noteid)
  551. Return
  552.  
  553. :RANDCOLOR
  554.         r=Int(Random(255))
  555.         g=Int(Random(255))
  556.         b=Int(Random(255))
  557.         q=min(r,g,b)
  558.         if q==r then r=0
  559.         if q==g then g=0
  560.         if q==b then b=0
  561.         q=max(r,g,b)
  562.         if q==r then r=255
  563.         if q==g then g=255
  564.         if q==b then b=255
  565.       
  566.      Return
  567.  
  568. :DoHelp
  569.      text1="You can add help text to your script easily. "
  570.      text2="Just edit the DoHelp sub routine to add your instructions."
  571.      text3="Remember, you can always use the WinHelp() function to call Windows help files."
  572.      text=StrCat(text1, text2, text3)
  573.      Message("Help",text)
  574. Return     
  575.      
  576. :Empty
  577.      Message("Empty","This can be used for your own purposes.")
  578. Return
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.