home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
utility
/
batsh201
/
sample4.bsh
< prev
Wrap
Text File
|
1995-12-09
|
2KB
|
78 lines
REM Demo for the WAIT DROP command with MENU and HELP
;****************************************************
; different file functions using parameters
if %1==HELP goto help
if %1==MENU1 goto menu1
; include help option
set $HELP=batsh.exe sample4.bsh help
; menu options
menu 'User defined menu-option' batsh.exe sample4.bsh menu1
menu 'Desktop Settings' control.exe desktop
;****************************************************
;
wait off
run winfile.exe
;
label drop a file or use my help
:repeat
wait drop
if exist %$DROP% if %$TYPE%==TXT goto showfile
MESSAGE INFO
The variable $DROP has now the file-name:
%$DROP%
stored for further processing.
The above file is of type: %$TYPE%
If you drop a PC text file TXT ,
it will be shown in a BATSH message box.
.click here to continue
goto repeat
;
:showfile
font=fixed
message File:%$drop%
@%$DROP%
.0
font=var
goto repeat
;******************************************************
;message box for help option
:help
show hide
message HELP for BATSH - SAMPLE4
This message box shows a help definition that
is defined in the waiting BATSH file.
Sample4:
With the DROP feature, you can drag
a file from the FILE-MANAGER to the
BATSH icon. The BATSH file processing
will continue, and the filename can
be used for programed actions.
.60
exit
;******************************************************
;message box for 'User defined menu-option'
:menu1
show hide
message BATSH - User defined menu-option
Two menu options can be defined in BATSH files.
Additional menu definitions will replace previous ones.
Examples:
option to start Desktop Settings
menu 'Desktop Settings' control.exe desktop
option to play the solitaire game from windows
menu "It's game time" sol.exe
erase all user options
menu
erase the 'Desktop Settings' menu
menu 'Desktop Settings'
.60