home *** CD-ROM | disk | FTP | other *** search
/ swCHIP 1991 January / swCHIP_95-1.bin / utility / batsh201 / sample4.bsh < prev   
Text File  |  1995-12-09  |  2KB  |  78 lines

  1. REM Demo for the WAIT DROP command with MENU and HELP
  2. ;****************************************************
  3. ; different file functions using parameters 
  4. if %1==HELP goto help
  5. if %1==MENU1 goto menu1
  6. ; include help option
  7. set $HELP=batsh.exe sample4.bsh help
  8. ; menu options
  9. menu 'User defined menu-option' batsh.exe sample4.bsh menu1
  10. menu 'Desktop Settings' control.exe desktop
  11. ;****************************************************
  12. wait off
  13. run winfile.exe
  14. ;
  15. label drop a file or use my help
  16. :repeat
  17. wait drop
  18. if exist %$DROP% if %$TYPE%==TXT goto showfile
  19. MESSAGE INFO
  20.      The variable $DROP has now the file-name:
  21.      %$DROP%
  22.      stored for further processing.
  23.  
  24.      The above file is of type:  %$TYPE%
  25.  
  26.      If you drop a PC text file  TXT  , 
  27.      it will be shown in a BATSH message box.
  28.  
  29. .click here to continue
  30. goto repeat
  31. ;
  32. :showfile
  33. font=fixed
  34. message File:%$drop%
  35. @%$DROP%
  36. .0
  37. font=var
  38. goto repeat
  39. ;******************************************************
  40. ;message box for help option
  41. :help
  42. show hide
  43. message HELP for BATSH - SAMPLE4
  44.  This message box shows a help definition that
  45.  is defined in the waiting BATSH file. 
  46.  
  47.  Sample4: 
  48.           With the DROP feature, you can drag
  49.           a file from the FILE-MANAGER to the 
  50.           BATSH icon. The BATSH file processing
  51.           will continue, and the filename can 
  52.           be used for programed actions.
  53. .60
  54. exit
  55. ;******************************************************
  56. ;message box for 'User defined menu-option' 
  57. :menu1
  58. show hide
  59. message BATSH - User defined menu-option
  60.  
  61.  Two menu options can be defined in BATSH files.
  62.  Additional menu definitions will replace previous ones.
  63.  
  64.  Examples:
  65.  
  66.    option to start Desktop Settings
  67.         menu 'Desktop Settings'  control.exe desktop
  68.    option to play the solitaire game from windows
  69.         menu "It's game time"  sol.exe
  70.    erase all user options
  71.         menu
  72.    erase the 'Desktop Settings' menu
  73.         menu 'Desktop Settings'
  74.  
  75.  
  76. .60
  77.