CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
PowerBatch (and it's advanced version PB Plus+) is a language and compiler for the novice with no programming experience. This tool will allow the creation of sophisticated compiled, executable computer programs. I developed PowerBatch to allow me to quickly create professional programs that replace the task usually performed by ugly and slow batch files. The output from the compiler is an executable .EXE program without any tag-along enhancer files of 300k or more.
PowerBatch was originally written in 1989 and is now at revision 2.3. Over the years thousands of users have asked for various enhancements and it is now a very powerful language. Through all the enhancements, I have been diligent to keep PowerBatch and PB Plus+ very easy to use. It was originally intended for the non-programmer and I have not lost sight of that goal.
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
First and foremost, PowerBatch and PB Plus+ are fast! You will not believe the speed. This comes of course because it is a compiled program.
You have total control of the screen. Change colors, border colors, or character colors all with ease (does not use ANSI.SYS). Directly address any screen position for writing text. Draw boxes of all types with/without a shadow. Create a window that is redefined to the operating system as the total screen (all text wraps and scrolls on the window border). Create multiple windows and scroll them independently. Automatically center lines of text.
Retrieve information from the computer that your program is currently running on. Current color, directory, date, drive, or time. Does a directory or file exist? What type of disk is drive A, B,C,D,... How much total space is on the drive, how much is free. Query and change environment variables. How difficult are these commands to use? The command to find out the capacities of the drive is simply
?DISKSPACE Drive,Totalspace, Freespace
After the execution of the command, the two variables "Totalspace" & "Freespace" contain the number of bytes for each.
One of the downfalls of a batch file is the lack of security it holds. If you as a consultant supply a batch file for a particular task, the end user can change the batch file "just a little bit", cause it to crash or worse corrupt data somewhere and guess who gets blamed for the problem? The consultant who wrote the thing in the first place! Well, not only are PowerBatch and PB Plus+ files compiled and your user cannot change them, but one of the commands is BREAK OFF. This simply means that no matter what key the user presses short of Alt/Ctl/Del will stop the program from completing its assigned task. Network people love this because it keeps people from breaking out of a network batch utility and dropping them directly into the operating system where they can really do some damage.
The string handling capabilities allow you to locate a string within a larger string, combine strings, change upper/lower case, trim unwanted characters from either end of the string, search and replace, and more.
You can send data directly to the printer. OK, not a big accomplishment, but you get back a return code from the printer that tells you whether the print request was successful or not. Things like printer not ready, printer out of paper, etc. are real handy when you don't have someone there to look after the printing of the backup results in the middle of the night. Send a request to the printer to print a blank or a null string (nothing) and check the return code to see if the printer is ready before you actually begin the print job.
Math commands are not only included in the language, but maintain accuracy to 18 significant digits. Find another compiler that provides that kind of accuracy. You could actually write a calculator program with PowerBatch. As a matter of fact, one of the demo programs included is a calculator.
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
You can read and write text files. Need to create an install program that checks the AUTOEXEC.BAT file for FILES=20 or more? No problem. Read the AUTOEXEC.BAT file until you find FILES= and check to see if it contains 20 or more. If not ask the user if you are to change it and you can create a new AUTOEXEC.BAT.
Have you ever dealt with arrays? You have to define the length of each element, determine the maximum number of elements you might have and define the array for this size plus 25% because the consequences of running out of room are disastrous. Not only that, but if you have elements that range in size from 5 to 35 characters in length, each element in the array will take up 35 memory positions no matter what the actual size happens to be. If you miscalculate the number of elements and write more than the allocated amount in your array, you just write all over other parts of your program ending in disaster. How about an alternative...ESTIMATE the AVERAGE size of an element in your array and ESTIMATE the total number of elements in the array. You will have this amount of memory allocated, but each element will only use as much memory as actually required. If you run out of space, additional memory will automatically be allocated for you! For example...if you have an array that will have approximately 200 elements of about 15 characters each, you will be allocated 3000 bytes of memory for this array. You can write any combination of element size/number of elements which consume 3000 bytes (ie 150 elements of 20 bytes, 200 elements of 15 bytes, 15 elements of 200 bytes, or any combination that adds up to 3000). When you have consumed your allocated 3000 bytes you will AUTOMATICALLY be allocated additional memory without your program skipping a beat.
A mouse is fully supported. If you want to construct a menu that is selected by moving the mouse pointer over a menu selection and clicking, this is all within the capabilities of the compiler. Click on HELP boxes, popup error messages an click on OK, all are easily created.
Now for probably the most powerful command of all. With PowerBatch & PB Plus+, you at some time will have the need to execute another program from within your program. It may be as simple as a menu program that executes the word processor, spreadsheet, accounting package, etc. Some of these programs will require as much memory as you can supply to them. But if you are running them from within another program (a shell) this program will consume a portion of the available memory. Using our compiler, you can cause your program to be swapped out to EMS or XMS memory or to a hard drive. When the memory hog is finished, your program will automatically be reloaded and execution will take up right where it left off. This is called "swapping out a program". You have to check for EMS or XMS, check to see if memory is available, allocate some memory, swap out the program, set up the "return hook", and initiate the child process program. Sounds complicated doesn't it? The PB Plus+ command is simply SWAP ON. Everything else is automatic!
I promised that I had remained true to the goal of keeping it simple to create professional programs. You will find this to be true throughout the language.
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
There are four ways to get PowerBatch or PB Plus+:
If you purchase the evaluation disk directly from the author, you will receive exactly the same files that are contained in the downloads from Compuserve or the Internet with the possible exception that the Internet files may not contain the very latest software version. I always keep the very latest version loaded in PCUTIL on Compuserve. I am not in control of the Internet sites. If you register the evaluation version, you will receive whatever is the latest version of the software from me, replacing the evaluation disk. If you purchase the advanced version, PB Plus+, you will receive a printed manual as well. If you purchase either PowerBatch or PB Plus+, I offer a no questions asked, money back guarantee within the first 90 days. Support is provided on Compuserve and the Internet by me, the guy who wrote it. I am not in the business of selling you something that you don't like and making you keep it when you can't use it.
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
Forum Name PCUTIL, Lib1 (DOS utilities) Download PWRBAT.EXE This self-extracting file will create the compiler, documentation and example programs.
At each web site look for the keyword PWRBAT
You can order PowerBatch or PB Plus+ directly from me (don't order both because everything in PowerBatch is in PB Plus+ and more) via check or cash, from Compuserve and have the charges added to your monthly Compuserve bill, or from Public Software Library via credit card. Both Compuserve and PSL add a small charge for handling the transaction.
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
Send your check, money order, or cash in US dollars with cchecks drawn on a US bank in the amount of:
| Product Description | Price |
|---|---|
| Evaluation Disk | $5 |
| PowerBatch (US & Canada) | $30 |
| PowerBatch (outside US & Canada) | $35 |
| PB Plus+ (US) | $45 |
| PB Plus (Canada) | $48 |
| PB Plus (outside US & Canada) | $50 |
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
Ordering from Compuserve is accomplished by entering GO SWREG at any Compuserve prompt and following the directions from Compuserve.
| Product Description | Product Code |
|---|---|
| PowerBatch | 2335 |
| PB Plus+ | 2336 |
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
You may order from Public Software Library via telephone or FAX. Please furnish your credit card number, the name which appears on the credit card, and the billing address of the credit card. The telephone numbers are:
| Product Description | Product Code |
|---|---|
| PowerBatch | 11265 |
| PB Plus+ | 11266 |
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
Variables may be defined to receive values from commands or to contain initial values. There is no limit on the number of variables and a variable may be up to 255 characters in length.
Variable InChar,1 to receive input from the keyboard Variable Heading,25,'Computing Systems Design' define an initial value Variable Esc,1,#27 define an initial value of escape characterRetrieve the current date...After the execution of this command, the variables DayOfWeek, Month, Day and Year will contain values such as Thursday,04,02,1996
?Date DayOfWeek,Month,Day,YearRetrieve the volume ID and type of drive for the specified drive. This command might return "MYDRIVE","720 Floppy" in the two variables.
?DiskInfo 'A',VolID,DriveTypeDraw a box with a shadow on the screen with the upper left corner at col 5, row 3, and the lower right corner at col 75, row 20. Set the screen color to red characters on a black background.
Box4 5,3,75,20,4,,8Clear the screen to a background of all ###### (actually something like ascii char 176 is a much better choice, but cant be put into this page), set the border of the screen to red with red on black characters.
Clear 4,0,'#',4or alternately
Variable Pattern,1,#176 Variable Red,1,4 Variable Black,1,0 Clear Red,Black,Pattern,RedDefine an array that will contain a list of file names, called "Files". I estimate there will be about 200 filenames in the array and each filename will be a maximum of 12 long.
DefArray 'Files',12,2002400 bytes of memory will be set aside for this array to be used in any way you choose. If a file name is "X.COM", it will consume only 5 of the memory positions. I could place 480 files of this length in the array. If we store a full path name such as "C:\DIR1\SUBDIR\MYFILE.DAT", this is stored without problem, it just uses 25 memory positions.
Find a string of characters within another string.
Variable StrLoc,3 Variable InputStr,255,"This is a test string" LocStr 'is',InputStr,,StrLocThis command will find the first occurrance of "is" within the string. StrLoc will contain 3 after execution of the command.
LocStr "is",InputStr,2,StrLocwould place 6 in StrLoc (the location of the second occurrance of "is").
Read a file called "AUTOEXEC.BAT" into a record area called FileRec.
ReadFile "C:\AUTOEXEC.BAT",FileRecFileRec now contains the contents of the first line (record) in the AUTOEXEC.BAT file.
Save an area of the screen in preparation of "popping up" a selection box. After the selection is made, the screen will be restored.
SaveBox 20,5,40,8 Perform SelectOpt RestBoxThe screen area from col 20, row 5 to col 40, row 8 will be saved, colors, characters and all. A routine is performed which allows the user to make a selection from a set of options (whatever you write in the routine SelectOpt) and upon returning from the subroutine, the screen area is restored. Screen areas may be "stacked" up to 16 levels deep. Performs may be stacked up to 32 levels deep.
In preparation for running a very large program from my menu (WP.COM), I want to save my current PB Plus+ program and free up all but 4k of memory. When the memory hog program finishes, automatically reload my program and continue where I left off.
Swap On WPAfter WP finishes, your program is automatically reloaded. PB+ will first look for available EMS, then available XMS, and finally available disk space for the program swapping.
Write a string to the screen which is the title screen for my program. Write this string at location col 15, row 3.
Variable TitleColor,3,112 Variable CompName,25,"The ABC Company" WriteAt 15,3,CompName,TitleColoror
WriteAt 15,3,"The ABC Company",112
CSD Home | Top | Features | Advanced Features | Prices | Free Copy | Examples | Questions?
.
.
.
.
.
.
.
.
.