home *** CD-ROM | disk | FTP | other *** search
/ alphant.com / ftp.alphant.com.zip / ftp.alphant.com / Shells / WB96B32D.ZIP / BOXDEMO.WB_ < prev    next >
Text File  |  1996-01-16  |  19KB  |  596 lines

  1. ;;;;;;;;;;;;;;;; Generic Initialization ;;;;;;;;;;;;;;;;;;;;
  2.  
  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.     
  137.    if iBox
  138.       BoxDataClear(1,"TOP")
  139.       switch iBox
  140.          case bDraw
  141.             gosub DoDraw
  142.             break
  143.          case bLines
  144.             gosub DoLines
  145.             break
  146.          case bBoxes
  147.             gosub DoBoxes
  148.             break
  149.          case bDots
  150.             gosub DoDots
  151.             break
  152.          case bExit
  153.             exit
  154.             break
  155.          case bText
  156.             gosub DoText
  157.             break
  158.          case bTherm
  159.             gosub DoTherm
  160.             break
  161.          case bHelp
  162.             gosub DoHelp
  163.             break
  164.          case bEmpty
  165.             gosub Empty
  166.             break
  167.       end switch
  168.  
  169.    endif
  170. end while
  171. exit
  172. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  173. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  174. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  175. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  176.  
  177. :DODRAW
  178.      BoxCaption(1,"Scribble")
  179.      BoxNew(2,"0,0,1000,1000",0)
  180.      BoxPen(2,RED,1)
  181.         BoxButtonDraw(1,bExit,    "E&xit",  "750,860,900,930")
  182.      BoxDataTag(2,"FRED")
  183.      Exclusive(@ON)
  184.      olda="500,500"
  185.      while 1
  186.         BoxDataClear(2,"FRED")
  187.         a=MouseInfo(6)
  188.         a=strreplace(a," ",",")
  189.         BoxDrawLine(2,"%olda%,%a%")
  190.         olda=a
  191.         if BoxButtonStat(1,bExit)==1 then break
  192.      endwhile
  193.      BoxDestroy(2)
  194. Return
  195.  
  196. :DOLINES
  197.      BoxCaption(1,"That Old Line")
  198.      BoxNew(2,"0,0,1000,1000",0)
  199.      BoxColor(2,BLACK,0)
  200.      BoxDrawRect(2,"0,0,1000,1000",2)
  201.      BoxButtonDraw(1,bExit,    "E&xit",  "750,860,900,930") 
  202.      BoxDataTag(2,"APPLE")
  203.      
  204.      p1=200
  205.      p2=200
  206.      p3=400
  207.      p4=400
  208.      
  209.      v1=10
  210.      v2=-20
  211.      v3=-5
  212.      v4=15
  213.      
  214.      bb=1
  215.      ErrorMode(@OFF)
  216.      while 1
  217.         if BoxButtonStat(1,bExit)==1 then break
  218.         if LastError()==10108
  219.            BoxDataClear(2,"APPLE")
  220.            BoxPen(2,"%r%,%g%,%b%",1)
  221.         endif
  222.         if bb==1
  223.            BoxDataClear(2,"APPLE")
  224.            gosub randcolor
  225.            BoxPen(2,"%r%,%g%,%b%",1)
  226.            bb=0
  227.         endif
  228.         BoxDrawLine(2,"%p1%,%p2%,%p3%,%p4%")
  229.         bb=0
  230.         for q=1 to 4
  231.             p%q%=p%q%+v%q%
  232.             if p%q% <= 0
  233.                p%q%=0
  234.                v%q%=Int(Random(10))+1
  235.                bb=1
  236.             endif
  237.             if p%q% >= 1000
  238.                p%q%=1000
  239.                v%q%=-Int(Random(10))-1
  240.                bb=1
  241.             endif
  242.         next
  243.      endwhile
  244.      BoxDestroy(2)
  245. Return
  246.  
  247. :DOBOXES
  248.      BoxCaption(1,"Random Rectangles")
  249.      BoxNew(2,"0,0,1000,1000",0)
  250.      BoxButtonDraw(1,bExit,    "E&xit",  "750,860,900,930")
  251.      BoxDataTag(2,"ACORN")
  252.      ErrorMode(@OFF)
  253.      while 1
  254.         if BoxButtonStat(1,bExit)==1 then break
  255.         x=Random(1000)
  256.         y=Random(1000)
  257.         s=Random(1000)
  258.         t=Random(1000)
  259.         r=Random(255)
  260.         g=Random(255)
  261.         b=Random(255)
  262.         BoxColor(2,"%r%,%g%,%b%",0)
  263.         BoxDrawRect(2,"%x%,%y%,%s%,%t%",2) 
  264.         if LastError()==10108
  265.             BoxDataClear(2,"ACORN")
  266.             BoxUpdates(1,3)
  267.         endif
  268.      endwhile
  269.      ErrorMode(@CANCEL)
  270.      BoxDestroy(2)
  271. Return
  272.  
  273. :DODOTS
  274.      BoxCaption(1,"Driving Me Dotty")
  275.      BoxNew(2,"0,0,1000,1000",0)
  276.      BoxButtonDraw(1,bExit,    "E&xit",  "750,860,900,930") 
  277.      BoxColor(2,BLACK,0)
  278.      BoxDrawRect(2,"0,0,1000,1000",2)
  279.      brk=0
  280.      x=500
  281.      y=500
  282.      oldxx=0
  283.      oldyy=0
  284.      z=5
  285.      z2=10
  286.      BoxDataTag(2,"SAM")
  287.      while 1
  288.         BoxDataClear(2,"SAM")
  289.         gosub RandColor
  290.         BoxColor(2,"%r%,%g%,%b%",0)
  291.         for q=1 to 100
  292.           x1=x-z
  293.           x2=x+z
  294.           y1=y-z
  295.           y2=y+z
  296.           BoxDrawCircle(2,"%x1%,%y1%,%x2%,%y2%",2)
  297.           ww=Int(Random(100))
  298.           if ww>16
  299.              xx=oldxx
  300.              yy=oldyy
  301.           else
  302.              xx=ww&3
  303.              if xx==3 then xx=0
  304.              yy=(ww&12)>>2
  305.              if yy==3 then yy=0
  306.           endif
  307.           
  308.           if x<=0 then xx=2
  309.           if x>=1000 then xx=1
  310.           if y<=0 then yy=2
  311.           if y>=1000 then yy=1
  312.           oldxx=xx
  313.           oldyy=yy
  314.           if xx==2 then x=x+z2
  315.           if xx==1 then x=x-z2
  316.           if yy==2 then y=y+z2
  317.           if yy==1 then y=y-z2
  318.         if BoxButtonStat(1,bExit)==1
  319.            brk=1
  320.            break
  321.         endif
  322.         next
  323.         if brk==1 then break
  324.      endwhile
  325.      BoxDestroy(2)
  326. Return
  327.  
  328. :DOTEXT
  329.         BoxCaption(1,"Fontopia")
  330.         BoxNew(2,"0,0,1000,500",0)
  331.         BoxColor(2,LTGRAY,2)
  332.         BoxColor(1,LTGRAY,0)
  333.         BoxButtonDraw(1,bExit,"E&xit","750,860,900,930") 
  334.         BoxDrawRect(2,"0,0,1000,1000",2)
  335.         BoxDrawRect(1,"0,500,1000,1000",2)
  336.         words="The quick brown fox went happy stroll dark woods looking for something tasty dinner soon found picnic basket full yummy goodies "
  337.         wc=ItemCount(words," ")
  338.         BoxTextColor(1,BLACK)
  339.          ;;;;;;;;;
  340.         BoxTextFont(1,"",20,0,0)
  341.         BoxTextColor(1,RED)
  342.         BoxDrawText(1,"25,510,1000,545","Results shown will vary with installed fonts...",0,0)
  343.         BoxTextColor(1,BLACK)
  344.         fonttype=0
  345.         xxx=25
  346.         yyy=xxx+225
  347.         BoxTextFont(1,"",30,fonttype,0)
  348.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Normal",0,0)
  349.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  350.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  351.         BoxTextFont(1,"Arial",30,fonttype,8)
  352.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  353.         BoxTextFont(1,"Modern",30,fonttype,12)
  354.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  355.         BoxTextFont(1,"Script",30,fonttype,16)
  356.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  357.         BoxTextFont(1,"Old English Text MT",30,fonttype,22)
  358.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  359.         fonttype=100
  360.         xxx=275
  361.         yyy=xxx+225
  362.         BoxTextFont(1,"",30,fonttype,0)
  363.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Italic",0,0)
  364.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  365.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  366.         BoxTextFont(1,"Arial",30,fonttype,8)
  367.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  368.         BoxTextFont(1,"Modern",30,fonttype,12)
  369.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  370.         BoxTextFont(1,"Script",30,fonttype,16)
  371.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  372.         BoxTextFont(1,"Old English Text MT",30,fonttype,20)
  373.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  374.         fonttype=70
  375.         xxx=525
  376.         yyy=xxx+225
  377.         BoxTextFont(1,"",30,fonttype,0)
  378.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Bold",0,0)
  379.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  380.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  381.         BoxTextFont(1,"Arial",30,fonttype,8)
  382.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  383.         BoxTextFont(1,"Modern",30,fonttype,12)
  384.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  385.         BoxTextFont(1,"Script",30,fonttype,16)
  386.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  387.         BoxTextFont(1,"Old English Text MT",30,fonttype,20)
  388.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  389.         fonttype=170
  390.         xxx=775
  391.         yyy=xxx+225
  392.         BoxTextFont(1,"",30,fonttype,0)
  393.         BoxDrawText(1,"%xxx%,550,%yyy%,600","Bold Italic",0,0)
  394.         BoxTextFont(1,"Times New Roman",30,fonttype,4)
  395.         BoxDrawText(1,"%xxx%,625,%yyy%,675","Times New Roman",0,0)
  396.         BoxTextFont(1,"Arial",30,fonttype,8)
  397.         BoxDrawText(1,"%xxx%,700,%yyy%,750","Arial",0,0)
  398.         BoxTextFont(1,"Modern",30,fonttype,12)
  399.         BoxDrawText(1,"%xxx%,775,%yyy%,825","Modern",0,0)
  400.         BoxTextFont(1,"Script",30,fonttype,16)
  401.         BoxDrawText(1,"%xxx%,850,%yyy%,900","Script",0,0)
  402.         BoxTextFont(1,"Old English Text MT",30,fonttype,20)
  403.         BoxDrawText(1,"%xxx%,925,%yyy%,975","Old English",0,0)
  404.         
  405.         
  406.         BoxDataTag(2,"PEACHY")
  407.         brk=0
  408.         cnt=0
  409.         wash=0
  410.         while 1
  411.            for i=1 to wc
  412.                 cnt=cnt+1
  413.                 gosub randcolor
  414.                 BoxTextColor(2,"%r%,%g%,%b%")
  415.                 x=Random(800)
  416.                 y=Random(800)
  417.                 s=x+Random(200)
  418.                 t=y+Random(200)
  419.                 fontsize=max(10,min(t-y,Random(200)))
  420.                 BoxTextFont(2, "", fontsize, 10+Random(80)+ (100*Int(Random(1))), (Int(Random(4)+1)*4 ))
  421.                 BoxDrawText(2,"%x%,%y%,%s%,%t%",ItemExtract(i,words," "),0,0)
  422.                 if BoxButtonStat(1,bExit)
  423.                     brk=1
  424.                     break
  425.                 endif
  426.                 if cnt==200
  427.                    cnt=0
  428.                    wash=wash+1
  429.                    if wash==8 then wash=0
  430.                    BoxColor(2,"%r%,%g%,%b%",wash)
  431.                    BoxDrawRect(2,"0,0,1000,1000",2)
  432.                 endif
  433.            next i
  434.            BoxDataClear(2,"PEACHY")
  435.            if brk then break
  436.         endwhile
  437.         BoxDestroy(2)
  438. Return
  439.  
  440. :DOTHERM
  441.  
  442.      rectutext="100,100,1000,900"
  443.      rectTherm="200,350,800,650"
  444.      rectButton="0,0,100,100"
  445.      rectThermLine1="100,550,900,550"
  446.      rectThermLine2="900,550,900,800"
  447.      rectThermLine3="900,800,100,800"
  448.      rectThermLine4="100,800,100,550"
  449.      ThermPenWidth=20
  450.      rectThermText1="100,50,1000,199"
  451.      rectThermPercent="490,625,550,725"
  452.      rectTopHalf="0,0,1000,210"
  453.      rectBotHalf="0,210,1000,1000" 
  454.      rectTitle="100,20,900,170"
  455.      rectTitleText="10,10,790,140"
  456.      TitleHeight=950
  457.      rectNote="100,30,900,270"
  458.      NoteHeight=400
  459.      rectNoteText="70,200,950,800"
  460.      
  461.      rectnoteline1="0,0,1000,0"
  462.      rectNoteline2="1000,1000,1000,0"
  463.      rectNoteLine3="0,1000,1000,1000"
  464.      rectNoteLine4="0,0,0,1000"
  465.      notepenwidth=20
  466.      rectnoteline1b="40,150,960,150"
  467.      rectNoteline2b="960,840,960,150"
  468.      rectNoteLine3b="40,840,960,840"
  469.      rectNoteLine4b="40,150,40,840"
  470.      notepenwidthb=10
  471.      Thermid=3
  472.      Noteid=4
  473.              ; Make main window look nice
  474.              BoxColor(1,"128,0,0",1)
  475.              BoxDrawRect(1,"0,0,1000,1000",2)
  476.              BoxCaption(1,"Are we making any progress here?")
  477.              
  478.  
  479.              
  480.    ;;;;Do note box
  481.              BoxNew(Noteid,rectNote,1)
  482.              BoxColor(Noteid,LTGRAY,0)       ; Light Gray no gradient
  483.              BoxDrawRect(Noteid,"",2)
  484.              
  485.              BoxTextFont(Noteid,"Arial",NoteHeight,170,0)
  486.              BoxTextColor(Noteid,RED)
  487.              
  488.              BoxPen(Noteid,WHITE,notepenwidth)
  489.              boxdrawline(Noteid,rectNoteLine1)
  490.              boxdrawline(Noteid,rectNoteLine4)
  491.              BoxPen(Noteid,GRAY,notepenwidth)
  492.              boxdrawline(Noteid,rectNoteLine2)
  493.              boxdrawline(Noteid,rectNoteLine3)
  494.              BoxPen(Noteid,WHITE,notepenwidthb)
  495.              boxdrawline(Noteid,rectNoteLine2b)
  496.              boxdrawline(Noteid,rectNoteLine3b)
  497.              BoxPen(Noteid,GRAY,notepenwidthb)
  498.              boxdrawline(Noteid,rectNoteLine1b)
  499.              boxdrawline(Noteid,rectNoteLine4b)
  500.              
  501.              BoxDataTag(Noteid,"NOTE")
  502.              BoxDrawText(Noteid,rectNoteText,"Initializing...",1,4)
  503.              
  504.              
  505.              
  506.              ;Draw thermoneter outline
  507.              BoxNew(Thermid,rectTherm,2)
  508.              BoxUpdates(Thermid,0)
  509.              BoxCaption(Thermid,"Name Goes Here")
  510.              BoxColor(Thermid,LTGRAY,0)
  511.              BoxDrawRect(Thermid,"",2)
  512.              ; Draw updating thermometer here
  513.              ; there are 3 virtual pixels per percent
  514.              ; we have to draw 3 boxes and some text...
  515.              BoxDataTag(Thermid,"FRED")
  516.              BoxCaption(Thermid,"Please wait. Stepping through example...")
  517.              
  518.              FilesToCopy=16
  519.              FilesCopied=0
  520.              
  521.              for FilesCopied=1 to FilesToCopy
  522.                 BoxDataClear(Thermid,"FRED")
  523.                 BoxUpdates(Thermid,0)
  524.                 BoxColor(Thermid,GREEN,0)
  525.                 xxx= 100+((800*FilesCopied)/FilesToCopy)
  526.                 per=(100.0*FilesCopied)/FilesToCopy
  527.                 per=Int(per)
  528.                 BoxDrawRect(Thermid,"104,554,%xxx%,796",2)
  529.                 BoxColor(Thermid,GRAY,0)
  530.                 BoxDrawRect(Thermid,"%xxx%,554,896,796",2)
  531.                 BoxPen(Thermid,BLACK,ThermPenWidth)
  532.                 boxdrawline(Thermid,rectThermLine1)
  533.                 boxdrawline(Thermid,rectThermLine2)
  534.                 boxdrawline(Thermid,rectThermLine3)
  535.                 boxdrawline(Thermid,rectThermLine4)
  536.                 
  537.                 if per<50 then BoxTextColor(Thermid,WHITE)
  538.                 BoxDrawText(Thermid,rectThermPercent,"%per%%%",0,0)
  539.                 BoxTextColor(Thermid,BLACK)
  540.                 BoxColor(Thermid,LTGRAY,0)
  541.                 BoxDrawText(Thermid,rectThermText1,"Steps completed: %FilesCopied%",1,0)
  542.                 BoxDataClear(NoteId,"NOTE");;;
  543.                 BoxDrawText(Noteid,rectNoteText,"Showing Progress",1,4);;;
  544.                 BoxUpdates(Thermid,2)
  545.                 TimeDelay(Random(1.0))   ;Fake passage of time
  546.              next
  547.              BoxTextColor(Noteid,GREEN)        
  548.              BoxDrawText(Noteid,rectNoteText,"Example Complete",1,4)        
  549.              Message("Company Name Goes Here","Example Complete!!")
  550.              BoxDestroy(Thermid)
  551.              BoxDestroy(Noteid)
  552. Return
  553.  
  554. :RANDCOLOR
  555.         r=Int(Random(255))
  556.         g=Int(Random(255))
  557.         b=Int(Random(255))
  558.         q=min(r,g,b)
  559.         if q==r then r=0
  560.         if q==g then g=0
  561.         if q==b then b=0
  562.         q=max(r,g,b)
  563.         if q==r then r=255
  564.         if q==g then g=255
  565.         if q==b then b=255
  566.       
  567.      Return
  568.  
  569. :DoHelp
  570.      text1="You can add help text to your script easily. "
  571.      text2="Just edit the DoHelp sub routine to add your instructions."
  572.      text3="Remember, you can always use the WinHelp() function to call Windows help files."
  573.      text=StrCat(text1, text2, text3)
  574.      Message("Help",text)
  575. Return     
  576.      
  577. :Empty
  578.      Message("Empty","This can be used for your own purposes.")
  579. Return
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.