home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / wbt30a.zip / SLIDES.WBT < prev    next >
Text File  |  1991-02-17  |  2KB  |  41 lines

  1. ; This is the slide show WBT file.
  2. ; After a BMP file is displayed, hold the shift key down a second to
  3. ; move to the next BMP file
  4.  
  5. ; First we initialize a variable...
  6. Tab=Num2Char(9)
  7.  
  8. ; Then we iconize all windows so we can see the background.
  9.  
  10. Windows=WinItemize()              ; Get a list of all the Windows
  11. WinCount=ItemCount(Windows,Tab)   ; How many? Windows are delimited by tabs
  12.  
  13. :winloop
  14. if WinCount==0 then goto winexit  ; No more windows, goto next section
  15. ThisWindow=ItemExtract(WinCount,Windows,Tab) ;Pull out next window name
  16. WinIconize(ThisWindow)            ; And iconize it
  17. WinCount=WinCount-1               ; Decrement counter
  18. goto winloop                      ; Go and do the next window
  19.  
  20. :winexit
  21. DirChange(FilePath(FileLocate("WIN.INI")))  ; Change to Windows directory
  22. ListOfBmpFiles=FileItemize("*.BMP")         ; Get a list of all BMP files
  23. CurrentBmpNumber=1                          ; Initialize a counter
  24. MaxBmpNumber=ItemCount(ListOfBmpFiles," ")  ; How many BMP files are there?
  25.  
  26.                                             ; Display instructions
  27. Display(6,"The Wallpaper Show","Press the SHIFT key to move to the next Wallpaper.")
  28.  
  29. :loop
  30. if CurrentBmpNumber>MaxBmpNumber then Exit   ; Showed them all, byebye
  31. ShowBmpFile=ItemExtract(CurrentBmpNumber,ListOfBmpFiles," ")   ;Get next file
  32. TileTheWallpaper=@FALSE                      ; Take a guess at tiling
  33. if FileSize(ShowBmpFile)<40000 then TileTheWallpaper=@TRUE  
  34. Wallpaper(ShowBmpFile,TileTheWallpaper)      ; Change the wallpaper
  35. currentBmpNumber=CurrentBmpNumber+1          ; Increment counter
  36.  
  37. :wait
  38. Yield                                        ; Give other apps a chance at CPU
  39. if !IsKeyDown(@SHIFT) then goto wait         ; Is the Shift key down?
  40. goto loop                                    ; Shift Down?  Do next picture
  41.