HPLX.NET HOW-TO: A Unique Way to Use Software Carousel
This document describes the rather (I think) unique way I use Software Carousel on my HP Palmtop. If you have any comments, or ideas for improvement, drop me a line.
Rob Whitby has created a new utility called EXMBATCH. This utility allows you to run DOS command from an EXM file. This allows you to assign a key other than CTRL-123 to the program. The best part about this program is that it includes built-in support for Software Carousel, which allows you to do basically everything I describe on this page using LXBatch, only much easier and faster. I will leave this old description up for a bit longer, though, for those who are still interested.
If you don't know what Software Carousel is, here's a brief introduction. You can multitask the built-in, System Manager compliant programs that come on the 200LX. But DOS programs are a different story. Only one DOS program can be run at a time under the System Manager. To run another one, you have to exit the current application. (You can, of course, run other System Manager apps along with a DOS app, limited by available memory.) The DOS 5.0 DOSSHELL program allows task switching between DOS programs, but it's slow and inelegant. Software Carousel allows you to switch between up to 12 different DOS sessions with the press of a hotkey.
I have many large DOS programs on my 200LX. I've got Folio Views 2.1 (for a hypertext-like information storage system), Turbo C++ 1.0, Derive 3.0, Microsoft Word 5.5, GPSCGA 2.7, and HelpPC (for technical reference). Now most of these programs like memory, and lots of it. Ordinarily, I'd probably have to terminate System Manager and unload many TSRs (such as Buddy) to run Turbo C++. That would not be convenient. So I got Software Carousel to allow me to run these programs in separate sessions. Nothing unusual here! All perfectly ordinary uses of Software Carousel. But then things got weird.
You see, I happen to like icons. I also happen to dislike key combinations. Software Carousel is handy, but I don't particularly like pressing SHIFT-F2 to go into Folio Views, or SHIFT-F5 to go to Microsoft Word. It's hard to remember, and I could slip up and hit the wrong key and end up in Derive instead of Turbo C++. It just seems like a bum deal to me. Best of all would be if all applications had blue keys, with an icon and writing under them. But that's not possible for add-on apps. So the Application Manager is good enough. With that central location to select which application I wish to go to, I'm happy. Unfortunately, there's not really any way of doing that with an application in a separate session using Software Carousel. OR IS THERE?
Yes, as it turns out, there is. Using LXB by Rob Koenis, you can control Software Carousel from a batch file. I now have icons for Turbo C++, Derive, Microsoft Word, and Folio Views in the Application Manager. Selecting one of these and pressing Enter runs a batch file which sends a command line to the appropriate Software Carousel work area, and then a command which switches to that work area. Whammo! I'm in my program. To switch back, I just press the MORE blue key and I'm back the Application Manager.
Here's how to do this. First, the Software Carousel work areas need to be set up. Do this using the SCCONFIG utility. I have mine configured like this:
Area 1: System Manager, 546K
Area 2: Folio Views 2.1, 400K
Area 3: Turbo C++ 1.0, 546K
Area 4: Derive 3.0, 546K
Area 5: DOS Prompt, 546K
Area 6: Microsoft Word 5.5, 546K
When you go into the setup for each area, you can specify a list of commands that it will run when you first go into that area. This is set under Work Area Startup Command List. I set mine to batch files which automatically run the program I want in that particular work area. For example, in the Work Area Startup Command List field for work area 4, I have DERIVE.BAT. Then, of course, a batch file for each area must be set up. My Derive is stored in A:\DERIVE, so here are the initial contents of my DERIVE.BAT file:
Okay, so far, so good. Now, when you press your Software Carousel hotkeys (SHIFT-Function keys by default) you will switch over to that work area and run the application by default. But if you happen to exit the application, you will be returned to a DOS prompt. Also, we want to be able to run these programs from the Application Manager, at a friendly icon. So, let's go on.
At this point, you'll need to get a copy of LXBatch by Rob Koenis. All you really need is LXB.EXE for this purpose. Then, create the icons for whatever applications you have. (Do this using the ICN200LX editor.) Now comes the fun part.
For each application you want in the Application Manager, you'll need to create a batch file. (Remember that the .BAT file must have the same name as the .ICN file or the icon won't show up in the Application Manager.) Here is what the contents of the batch file should look like:
lxb scexecute <work area number> <name of the batch file you created under Work Area Startup Command List>
lxb scswitch <work area number>
The first parameter, <work area number>, is the number of the work area for this proram. (This would be 4 for my Derive example above.) The second is the name of the batch file you created for that work area's automatic execution (i.e., DERIVE.BAT). The LXBatch "scexecute" command sends a command to that work area. LXBatch's "scswitch" command will switch over to that work area. That's what we need! So we go into the Application Manager, "Add" and application (by pressing F2), fill in the name (i.e., Derive 3), the path (i.e., c:\derive2.bat; make sure you don't confuse the batch file you use for work area startup with the one used for the Application Manager), and make sure our icon is showing up, and then hit F10 to save it. Voila! We have a new application.
But there's a problem. The scexecute command won't send text or anything into the work area if a program is already running. This is good, because it means that "DERIVE.BAT" won't be waiting at the Derive input prompt when you go there, or "TC.BAT" won't be inserted into your program if you were switching there. But, if you have exited the program, and are back at a DOS prompt, it still won't send the command. The work area must be "killed," clearing everything, before scexecute will work again. So if you had accidentally exited from Derive, for example, and then switched back to work area 1, ran some System Manager programs, and then selected "Derive" from the Application Manager again, it wouldn't work. What can we do?
Well, let's edit the batch file we set up to be run from the Work Area Startup Command List. Before, in the example file DERIVE.BAT, we had:
But now let's change it a bit:
lxb volume 0 (This line is optional...I hate error beeps.)
lxb sckill 4 (This line is critical! It will "kill" the work area if the program is exited.)
We have basically inserted the command to kill the work area after the command to run the program. This will not cause any data loss (since it will go back to the DOS prompt anyway after the program terminates). I'm not sure exactly what difference you get once that sckill command has been executed, but it does mean that the next time you run the program from the Application Manager, the scexecute command will send its command into the work area. Without the sckill command, it won't.
So that's about it! Your application is now set up to be a large, task-switching Application Manager program. To get back to the Application Manager from one of your programs, you just have to hit the MORE key. To get to one of your new large DOS apps, you only have to hit ENTER on its icon in the Application Manager.
Copyright 1999, David Sargeant.
Last Updated 1-2-1999