home *** CD-ROM | disk | FTP | other *** search
- ; This demo batch file plays all wave files in the Windows directory,
- ; displaying a window which shows the name of each file as it is played.
-
- ; This part hides all open windows.
- TitleFill 100
- #B = Lines + 99
- For #A = 100 to #B
- Hide $[#A]
- Next #A
-
- ; Change to the Windows directory, to make things easier...
- CD WinDirectory
-
- ; Create a window at (100, 100) whose size is (220, 30), and place its
- ; handle in @A
- CreateWindow @A 100, 100, 220, 30
-
- ; Get the names of all .WAV files
- FileFill "*.WAV", 200
- #D = Lines + 199
-
- ; Start the play loop
- For #C = 200 to #D
-
- ; White-out the window
- PaintWindow @A, White
-
- ; Show which file we're playing
- WriteText @A, "Now playing " & $[#C] & ".", 10, 7
-
- ; Play the file
- PlaySound $[#C]
-
- ; And repeat until done
- Next
-
- ; Get rid of the window we created
- DestroyWindow @A
-
- ; This part unhides all hidden windows.
- For #A = 100 to #B
- Unhide $[#A]
- Next
-