home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Pier Shareware 6
/
The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso
/
033
/
info301a.zip
/
INFO.BTM
(
.txt
)
< prev
next >
Wrap
4DOS Compressed Batch-To-Memory File
|
1994-12-29
|
11KB
|
413 lines
@Echo Off
Cls
REM {
REM INFO.BTM 3.01 Revision A
REM Copyright 1994,95 by Matt Walters; all rights reserved.
REM }
REM {
REM Ok, Here is where it all starts, I just made it so that not everyhing in
REM this BTM file is shown (REM statements and so on). Right here I make sure
REM that the program will terminate if CTRL-C or CTRL-BRK is pressed. Some
REM people turn this off, I just want to make sure that break checking is on
REM so that they can stop the program if neccassary.
REM }
Break On
REM {
REM ***************************************************************************
REM Legal time...
REM I own this program, don't mess with it and then distribute yours...
REM ***************************************************************************
REM }
REM {
REM I use the {} to make my comments stick out. It comes from brief Turbo
REM Pascal programming "career". Just live with it, if you can't then stop
REM using the program... :)
REM }
REM {
REM Ok, here I test to see if 4DOS is around. I also test to see if it is 5.5
REM or higher. It it's not then it will produce a fatal error. (Can't have
REM people using is on an un-compatible system and then blaming me!) ;)
REM }
If Not "%@eval[2+2]" == "4" goto Messed_Up
Iff "%_4Ver" lt "5.5" then
goto Messed_Up
Else
goto Start_The_Program
EndIff
:Start_The_Program
REM {
REM Here I make sure that if something goes wrong, the program knows what to
REM do. If an error occurs, the program is sent to a place that will tell
REM the user as much information as it can, or if CTRL-C or CTRL-BRK is pressed
REM then they are told so and a fatal error usually is caused by this...
REM }
On Break goto Broken
On Error goto Messed_Up
REM {
REM Ok, here, all I do is clear out the environment so that I have room to do
REM stuff, it all gets set back again when I'm done... I also initialize any
REM variables that will later be used...
REM }
SetLocal
UNSET *
UNALIAS *
REM {
REM I want to make sure anything done to the HDD is checked, nothing should
REM be written to the HDD though.
REM }
Verify On
REM {
REM Here I start what will turn into an algorigthm by changing the drive letter
REM to a number so that I can play math with it for easier changing of drive
REM letters on a system that I (The programmer) don't know about...
REM }
Set DISK=%@ASCII[%_BOOT]
Set LD=%@ASCII[%_LASTDISK]
REM {
REM IntroDuction. I just tell the user what the program is, the version, and
REM who I am right here...
REM }
:Lets_Do_It
Cls
DrawBox 0 30 6 52 3 bri whi on green fill green
scrput 0 37 red on green INFO 3.01a
REM scrput 1 38 bri whi on bla Creator:
REM scrput 2 36 bri whi on bla Matt Walters
REM scrput 3 37 bri whi on bla PRESiDENT
REM scrput 4 36 bri whi on bla LoST SECToR
REM scrput 5 37 bri whi on bla SoFTWaRE
scrput 1 31 bri whi on green CPU: 80-%_CPU
scrput 2 31 bri whi on green Math-Co: 80-%_NDP
scrput 3 31 bri whi on green Shell level: %_SHELL
scrput 4 31 bri whi on green Date: %_DATE
scrput 5 31 bri whi on green Time: %_TIME
REM {
REM Here, I've made a place for my BTM file to come back to in case I'd like
REM it to do a continous loop. Of course this would mean my taking out the
REM PAUSE statement later in the program and changing it to a delay so that
REM it was still readable but didn't require any intervention by the user.
REM }
:Loop
REM {
REM Ok, now I'm drawing the first box in the upper left-hand corner of the
REM screen. This one tells the basics about the system, such as what type
REM of monitor is hooked up (as if you didn't know by looking <g>). Things
REM like that, and the BOOT disk and what the LASTDISK is... I added the
REM codepage because I thought that maybe some one out there new what it was
REM for, personally, I don't fell like telling it here...so don't ask me,
REM that's for your local guru to tell you about. :)
REM }
DrawBox 0 1 6 24 4 bri gree on mag fill mag
scrput 0 3 bri gree on mag System info:
REM {
REM Take note of the %@UPPER[<Text>]. It will take some text that you put in
REM there and put it in uppercase. Users, some of them, like seeing
REM directories in upper case, this is great for using with variables like %_CWD
REM and things like that...
REM }
scrput 1 2 bri gree on mag Monitor type: %@UPPER[%_Monitor]
scrput 2 2 bri gree on mag Video Board: %@UPPER[%_VIDEO]
scrput 3 2 bri gree on mag Boot Drive: %_BOOT
scrput 4 2 bri gree on mag Last drive: %_LASTDISK
scrput 5 2 bri gree on mag Code Page: %@COMMA[%_CODEPAGE]
REM {
REM Alright, this is the second window, the one in the upper right-hand corner.
REM Here I tell more detail about the system, like what country it's
REM set up for. Believe it or not that is actually useful. Since some conf-
REM igurations are set similiar but different... Any more questions? That's
REM also for the local guru... I also test for the presence of a DPMI driver,
REM and if it's found, I tell you, if not then, what else? I tell you it's
REM not there (big surprise to you I'm sure... <g>)
REM }
DrawBox 0 57 6 78 4 bri whi on blu fill blu
scrput 0 59 bri whi on blu Software info:
scrput 1 58 bri whi on blu Country Code: %_COUNTRY
scrput 2 58 bri whi on blu OS: %_DOS
scrput 3 58 bri whi on blu OS Version: %@COMMA[%_DOSVER]
scrput 4 58 bri whi on blu 4DOS Version: %@COMMA[%_4VER]
REM {
REM Here's where I'm testing for DPMI presence...
REM }
Iff "%_DPMI" == "1" then
scrput 5 58 bri whi on blu DPMI Number: %_DPMI
else
scrput 5 58 bri whi on blu DPMI: Not present
REM {
REM Hmm, (couldn't think of another way to start this one <g>...hope that's
REM good enough, alright and Ok were already taken <g>). Anyways, Here I draw
REM final box. This is the one on the bottom, which ALMOST has an appearance
REM of scrolling, I haven't been bored enough to do it yet though, that too
REM will come in a later version. I also test to see if DESQView<tm> is around
REM and if so tell you, if not don't tell you (Deja Vu?, I think not <g>).
REM }
drawbox 8 1 16 78 4 bla on red fill red
scrput 8 4 bla on red Memmory info:
REM {
REM Ok, this is a function of 4DOS that's great, use it EVERYWHERE you possibly
REM can. It makes for easier reading to the user. What I'm talking about is
REM the %@COMMA[<text>]. Read the manual to find out more about this one. It
REM takes a number and places commas inside the number to make it look nice.
REM It doesn't take long to do, just fill in <text> with what you want it to
REM put commas in (ie. Number that you are too lazy to put your own commas in
REM or a numeric variable, it'll probably give you an error if you try to do
REM this one on a variable that doesn't have numbers in it...
REM }
If "%Working" == "1" Goto Wierd_Loop
scrput 9 2 bla on Red Alias space: %@COMMA[%_ALIAS]
scrput 10 2 bla on Red Enivronment space: %@COMMA[%_ENV]
REM {
REM This where I test for DV to see if it's there...
REM }
Iff "%_DV" == "1" then
scrput 11 2 bla on Red DESQView: Present
else
scrput 11 2 bla on Red DESQView: Not Present
scrput 12 2 bla on Red DOS Memmory: %@COMMA[%@DOSMEM[b]] Bytes free
scrput 13 2 bla on Red EMS Memmory: %@COMMA[%@EMS[b]] Bytes free
scrput 14 2 bla on Red XMS Memmory: %@COMMA[%@XMS[b]] Bytes free
REM {
REM Ok, this is because a sort of what I view as a flaw with the SCRPUT command.
REM It (SCRPUT) doesn't leave the cursor in the last written to position. It
REM will leave it in wierd places once in a while... (Usually the top of the
REM screen even though I wrote the the bottom last...oh well). Anyways, all
REM I do is take advantage of another 4DOS command (since 4DOS is the ALMIGHTY
REM command processor) called the DO loop. You programmers will know what I'm
REM talking about. All you do is something like what I have down below... Type
REM DO <Number> (there are other things you can put instead of a number, that's
REM for the 4DOS doc writer to explain though...) Then on the next line, type
REM in the commands that you want it to repeat, and then type EndDo to end it
REM all... Now, back to my point, what this does is gets the cursor off the top
REM of the screen so that when any prompts return they don't overwrite the
REM information that I just told them...
REM }
:Write_It
screen 17 0
REM {
REM Alrighty, this is where I pause and let them look at the first viewing of
REM the bottom window, the top 3 will stay there for a while... Then, since
REM finding out the information on their hardware takes a minute, I make it
REM tell them that it is working...
REM }
REM {
REM Here is an example of where I check to see wether the user wants the program
REM to ask them to press a key or not
REM }
Iff Not "%1" == "/NoPress" then
Pause
else
Iff not "%2" == "" then
delay %2
else
Delay 5
EndIff
EndIff
screen 17 0 ****** Working ******
REM {
REM Ok, I've pretty much explained this one, all I do is draw the bottom window
REM again on top of the "old" bottom window. And put more variables in there
REM so that you have some more to look at...
REM }
REM {
REM Ok, here is where the algorithm starts. It converts the drive letter to
REM a number, adds one (1) to it and then converts it back to a drive letter,
REM then it checks to see if the drive is ready, if so it then continues proc-
REM essing to see if it is a CD-ROM or a Physical/NetWork Hard Drive. If
REM the drive wasn't ready then it gives an error message saying that the
REM drive was either not ready or not present. It stops when there are no other
REM drives to examine which is gotten from the _LASTDISK variable. While
REM examining the drive it also checks the available storage space on the drive
REM and if that value is less than 2 megs a warning message is given. It also
REM tells if the drive is a boot drive using the _BOOT variable.
REM }
:Wierd_Loop
screen 8 0
Set DRIVE=%@CHAR[%DISK%]
Iff "%@Ready[%DRIVE%]" == "0" then
drawbox 8 1 16 78 4 bla on red fill red
scrput 8 4 bla on red ERROR:
scrput 11 24 bla on red Drive %DRIVE% not present or not ready!
goto Wierd_Loop_Because_I_Said
else
echo.
EndIff
drawbox 8 1 16 78 4 bla on Red fill Red
scrput 8 4 bla on Red Miscelanious info:
scrput 9 2 bla on Red Free Disk Space for drive %@UPPER[%DRIVE%]: %@COMMA[%@DISKFREE[%DRIVE%,b]] Bytes
scrput 10 2 bla on Red Used Disk Space for Drive %@UPPER[%DRIVE%]: %@COMMA[%@DISKUSED[%DRIVE%,b]] Bytes
scrput 11 2 bla on Red Total Disk Space for Drive %@UPPER[%DRIVE%]: %@COMMA[%@DISKTOTAL[%DRIVE%,b]] Bytes
Iff "%@CDROM[%DRIVE%]" == "1" then
scrput 12 2 bla on Red Drive %DRIVE% is a CD-ROM drive.
else
Iff "%@REMOTE[%DRIVE%]" == "1" then
scrput 12 2 bla on Red Drive %DRIVE% is a NetWork drive.
else
Iff "%@REMOVABLE[%DRIVE%]" == "1" then
scrput 12 2 bla on red Drive %DRIVE% is a removable drive.
else
scrput 12 2 bla on Red Drive %DRIVE% is a physical drive.
EndIff
EndIff
EndIff
Iff "%_BOOT" == "%DRIVE" then
scrput 13 2 bla on red Drive %DRIVE% IS a boot drive.
else
scrput 13 2 bla on red Drive %DRIVE% IS NOT a boot drive.
EndIff
Iff %@DISKFREE[%DRIVE%,m] lt 2 then
scrput 14 2 bri whi on red Drive %DRIVE% has less than 2 megabytes free!!!
else
echo.
EndIff
:Wierd_Loop_Because_I_Said
Set DISK=%@ASCII[%DRIVE%]
Set DISK=%@EVAL[%DISK% + 1]
Iff "%DISK" gt "%LD" Then
Goto End
Else
Iff Not "%Working1" == "1" then
Goto Oughta_Here
Else
screen 17 0
Iff not "%1" == "/NoPress" then
screen 17 0
Pause
else
Iff not "%2" == "" then
Delay %2
else
Delay 5
EndIff
EndIff
Goto Oughta_Here_2
EndIff
EndIff
:Oughta_Here
Set Working1=1
Iff Not "%1" == "/NoPress" then
screen 17 0
Pause
else
Iff not "%2" == "" then
Delay %2
else
Delay 5
EndIff
EndIff
:Oughta_Here_2
screen 17 0 ****** Working ******
Set Working=1
Goto Wierd_Loop
REM {
REM Ok, Here I just set up a counter so that I can get out of any loops if I
REM need to... It gets UnSet before long...
REM }
Goto End
:Messed_Up
REM {
REM If the program comes here then something screwed up big time! This means
REM an error level of 3.
REM }
Cls Bri Red on Whi
Echo FATAL ERROR ENCOUNTERED!!!
Echo Reason for external program termination: %??
Echo Last internal command: %_?
Echo Last DOS error: %_SYSERR
EndLocal
GoSub Copyright
Quit 3
:Broken
REM {
REM Ok, if the file makes it into this little part then something went wrong
REM and they pressed CTRL-C or CTRL-BRK. This sets an errorlevel 2
REM }
Echo CTRL-C CTRL-BRK was pressed!
EndLocal
Gosub copyright
Quit 2
:End
REM {
REM Alright, here I clean up the users environment and reset all the stuff that
REM they had set, like paths and stuff... That's what the EndLocal does...
REM }
EndLocal
screen 17 0
GoSub CopyRight
Quit 1
:The_End
REM {
REM The program should never come here, so if it does then I tell it to exit
REM to produce a fatal error since something obviously screwed up.
REM }
Goto Messed_Up
:CopyRight
screen 19 0
Echo.
Echo INFO.BTM v3.01a Copyright 1994,95 by Matt Walters; all rights reserved.
Echo.
ReTurn
REM {
REM That's all folks!
REM }