*** Drop-Kick 1.0 **** By Devin Cook Copyright 1993,1994 dsc@u.washington.edu * NOTICE: * DROP-KICK is FREEWARE. It is distributed in "AS IS", full functioning version along with the source. The author is not responsible for any damage to your system or its contents which may occur from the use of this software! Sorry! * INTRODUCTION * Drop-Kick is a simple batch processor for Windows. It fills another one of the many gaps in the Windows operating system. Drop-Kick can run up to six programs in a sequential order, with the option of waiting for each program to complete execution, or to continue on to the next step without waiting. It can also be configured to sit as an icon on the desktop, waiting for a file to be dropped on it, from the file manager. As soon a the file is dropped on it, Drop-Kick executes the "batch" commands, passing the file or files as parameters to each program. ->> See the IDEAS section at the end for some hints as to how this program can be used. * Installation To install Drop-Kick, simply copy DROPKICK.EXE into your WINDOWS directory. Once you have copied the exe file, go to the file manager and create an ASSOCIATION between .DK files and DROPKICK.EXE. - Note - DROPKICK.EXE requires BWCC.DLL, available from many sources. * Setting Up A Drop Kick File Drop-Kick uses six "slots", one for each step in your batch. By pressing each of the six buttons, you can fill each "slot" with a different programs. Each of these programs has a working directory associated with it. It can also have arguments specified, which are passed to it when the program is executed. Legal program types are: DOS or Windows .EXE files, DOS .COM files, DOS .BAT files, Windows .PIF files. Each program slot also has the option to wait for the program to complete before the batch continues. Finally, a flag is set as to whether the program will abort the batch if there is an error loading the program. Once you have set each "slot" with your desired programs, you have the option of setting an icon to use when the batch file is in minimized mode. This icon will be displayed if the batch file is on desktop waiting for a file(s) to be dropped on it. An optional title can also be set for the batch. * Waiting for a file If you want your batch file to wait for a file to be dropped on it, you have three additional flags to set. First, set the "Wait For File" flag. This will force the batch file to be loaded and minimized. Once a file or files is dropped on it, the batch file executes using the file name(s) as parameters. If you want the batch file to wait for more files when it has completed, set the "Repeat Wait" flag. With this enabled, you can create "Virtual Devices", such as garbage cans, double column printers, or a link to your favorite editor, even though a file is associated with other software. Finally, set the "Parallel" or "Serial" flag to indicate whether you want all the files be processed together (Parallel), or if you want the batch file repeated for each (Serial). File names are passed as command line arguments to each step. Any file name is simply substituted for a "%1" in your command line argument. Example: Suppose your slot calls up a DOS program which prints files in two columns ( lets say Dbl_COL.EXE ). The file name line would look something like: C:\UTIL\DBL_COL.EXE and the argument line would be: %1 If you dropped WHOP1.TXT, WHOP2.TXT and WHOP3.TXT on the batch file from the file manager, dropkick would execute the step as follows: PARALLEL MODE: C:\UTIL\DBL_COL.EXE C:\WORK\WHOP1.TXT C:\WORK\WHOP2.TXT C:\WORK\WHOP3.TXT SERIAL MODE: C:\UTIL\DBL_COL.EXE C:\WORK\WHOP1.TXT C:\UTIL\DBL_COL.EXE C:\WORK\WHOP2.TXT C:\UTIL\DBL_COL.EXE C:\WORK\WHOP3.TXT * Note: in SERIAL MODE, the whole batch is executed for one file, then the next etc, as if you had dropped the files on the BATCH, one at a time. **************** *** WARNING **** **************** The command lines can easily exceed DOS's ability to handle them in Parallel mode. For this reason, Parallel mode is not recommended! * Ideas! Ideas! Ideas! Ideas! * Idea #1 - Bare Naked Printer! Want to simply be able to copy files to your printer? Simply write a dos batch file ( such as BarePrnt.Bat ) that has: COPY %1 LPT1: Now set up a Drop-Kick batch which waits for files, and calls BarePrnt.Bat with an argument of %1. Now you can simply drop any text-ish file on your drop-kick batch and off it goes! ( This beats the heck out of having to associate each file type with Notepad, which then prints it formatted! ) Idea #2 - Editor at your finger tips! Again, if you want to be able to use your favorite DOS editor on a text-ish file with out having to associate it by hand, build a drop- kick batch which waits for the file and drop it on. Idea #3 - Logging in and out of a network resource: Suppose you want to print to a network printer you don't normally use. Simple. Have three steps in your .DK file which does the following: Step 1: Log in to the new resource Step 2: Call your printout program Step 3: Log off the network resource This can be very useful in using other network resources, such as COM ports also. Idea #4 - Run and Exit Suppose you want to exit Windows quickly? No problem, there are tons of programs out there ( such as WinExit ) which can do it, but what if you need to run a batch file first? With Drop-Kick you simply put both calls in slots and off you go. I have seen this used a lot to set up batch files which execute when Windows has exited. A .DK file is created which waits for a file. When a file is dropped on it, it calls a batch files which creates another standardized .BAT file which is always executed when windows exits. The next slot has WinExit. A little complicated but it sure does the trick. Idea #5 - Alternative "Startup" folder Set up six applications to run as soon as you double click on the .DK file in your program manager. This way you can call up the clock, calculator and whatever else with a single selection. Good Luck! If you find other interesting uses for Drop-Kick please let me know! The code is give, but there are many cases where I got it working and didn't bother getting it down to the slickest possible code. Its a bit crude but functional. I'd also be interested in a help file if anyone wants to volunteer to write one! Many thanks to Neil Rubenking for is great book "Turbo Pascal for Windows - Techniques and Utilities" from which I borrowed many of these code fragments! Devin Cook dsc@u.washington.edu Enjoy!