home *** CD-ROM | disk | FTP | other *** search
- Variable FColor,1 ;store the current screen colors
- Variable BColor,1
- Variable ColorAttr,1
- Variable MenuSel,1
- ?Color FColor,BColor,ColorAttr
- Label ShowMenu
- Clear 112 ;clear screen to a new color
- Center "Demonstration Menu",2 ;center on line 2
- WriteAt 10,4,"A. Run a directory and return"
- WriteAt 10,6,"B. Run BoxDemo and return (DOS batch + PowerBatch + return)"
- WriteAt 10,8,"C. Reboot your system"
- WriteAt 10,10,"E. Exit this menu and return to DOS"
- Label GetInp
- WriteAt 15,13,"Enter your choice :"
- GoToXY 34,13
- ReadUpKey MenuSel ;get users selection
- Compare MenuSel,"A",ChekB,Error ;compare selection to A
- Clear 7,0 ;clear screen to fore 7, back 0
- dir "/w" ;run DOS dir command with /w parm
- Wait 30 ;wait 3 secs for show
- GoTo ShowMenu ;redisplay menu
- Label ChekB
- Compare MenuSel,"B",ChekC,Error ;compare selection to B
- Clear 15 ;clear screen to attribute 15
- DOSEX1 ;run a DOS batch file, then PowerBatch
- GoTo ShowMenu ;redisplay menu
- Label ChekC
- Compare MenuSel,"C",ChekE,Error ;compare selection to C
- Boot ;perform a warm boot
- Label ChekE
- Compare MenuSel,"E",Error,Error ;compare selection to E
- Clear ColorAttr ;restore original color
- Halt ;end the PowerBatch program
- Label Error ;come here for errors
- Blink ;reverse the colors
- WriteAt 5,20,"InCorrect menu selection...Try again."
- Beep 750,5 ;beep at 750 hz for half sec
- Wait 30 ;wait 3 secs to see msg
- Normal ;restore text attributes
- ClearLine 20 ;clear the message line
- GoToXY 34,13 ;erase the incorrect entry
- Write " "
- GoTo GetInp ;get new menu selection
-