![]() |
|
Published 1998-11-01 Printer-friendly version
The Clarion built-in RUN() command is good for a lot of situations where you simply need to run an EXE. But if you want more control over how that EXE runs, you should take a look at PowerRUN by Greg Berthume. PowerRUN makes use of a variety of Windows API calls, giving you better control of how your EXE runs. While you could spend the time to determine how to accomplish this on your own, Im not sure it is worth it. Greg has done an excellent job creating simple Templates that do this and several other things for you.
The main PowerRUN template parameters give you the following capabilities:
|
Mode |
Result |
| Run called application hidden | The called application runs 'invisibly'. The user cannot access the called application |
| Run called application as the foreground window | Called application gets focus and appears on top of all existing windows. |
| Run called application in minimized window | Called application gets focus, but begins in a minimized state |
| Run called application in maximized window | Called application gets focus and begins in a maximized state |
| Run calling application minimized window | Your calling application retains focus while the second application runs minimized |
| Run as a window behind the calling application | Your calling application retains focus while the second application opens normally behind it. |
|
Process Priority (32 bit only) |
|
| Low | Run when system is idle |
| Normal | (default priority) |
| High | Can affect multi-tasking; highly responsive |
| Real-time | Preempts even the operating system (this one is dangerous) |
To use PowerRUN, you first need to include a Global Extension in your application.
After that, you specify the EXE or command that you want to run, select how you want the application to display, what priority (only works in 32bit), and then let the template do all the work for you. This can be done from either a procedure extension template or a code template. If you use the code template, you must also add a Procedure Extension template for the Code Template to work. I like how Greg reminds you what to include right on his templates. This keeps you from having to go back and look at the documentation.
Not only can these templates run a Windows program, they can also run a DOS EXE, a batch file or a DOS command.
Let's say you want to PKZIP a file using the DOS PKZIP utility and you do not want the DOS screen to appear. To do this, you would use the DosProc.Pif file that comes with PowerRUN and Run PKZIP in hidden mode using the PowerRUNs Procedure Extension template. You would probably also want to display a message letting the user know that something is processing, so make sure your window has the Timer set to 1 and the Cursor as Wait. This is a lot easier than looking up all the API calls, and looks much more professional than having the DOS box pop up as it does when using the Clarion RUN() command.
ShellExecute() is a Windows API call that is used to launch the application associated with a specific file type (extension). For example, using a TXT file might launch Notepad.EXE and load your text file. The PowerRUN ShellExecute() template implements this function, letting you, for instance, launch the user's default Internet browser and load a URL that you specify. You don't need to know which program will handle your request, Windows figures that out for you according to how the user's own machine is set up.
The Wave file template let you play a *.WAV file from your application. It makes an API that runs a Windows application that allows you to play your Wave file.
PowerRUN also includes Jeroen van Helvoort's CWPRINT template, which has been modified to take advantage of PowerRUN's "Wait Until Completion" capability.
While PowerRUN does not use an install program, it is not hard to install. The documentation has an Install section that clearly states how to install PowerRUN. Basically, you must copy two template files to your Template directory and two source files to your LibSrc directory.
PowerRUN is well implemented and has great examples. The templates work just as you would expect (no surprises). Primarily, the templates call the Windows API, so it performs as well as Windows performs.
The documentation was a TXT file which did a good job of explaining PowerRUN's Installation, Templates, Technical Support, Licensing and Return Policy. I found it to be very clear and easy to follow. Additionally, a great example Application was included, which showed all the major features of PowerRUN and how to implement each one. I thought the documentation was very clear and easy to follow. However, it would be nice if Help was included with the templates. Overall, between the documentation and the example App it is easy to implement and use.
While I didn't need much assistance with PowerRUN, I was impressed with the quick response that I got when I EMailed Greg Berthume. I posted a message at about midnight and got a reply at about 10:00AM the next morning. This does not surprise me, since I often see messages posted by Greg on CompuServe and on the Clarion Newsgroups.
You could spend several hours with an API bible and figure out how to implement a lot of what PowerRUN does for you. For $10, though, (when ordered directly through Greg Berthume) or $13 (when ordered through CompuServe or BMT Micro), PowerRUN is a bargain. Greg has done a splendid job and I highly recommend his product. This is a great example of someone transferring his knowledge and capabilities by writing a set of templates. Greg is so sure that you will like PowerRUN that he has a 30-day money back guarantee.
| Category |
Product Score |
| Ability to do the task |
Very Good |
| Ease of use |
Very Good |
| Ease of Installation |
Good |
| Documentation |
Good |
| Technical Support |
Very Good |
| Modifies Shipping Templates |
No |
| Black-Box DLLs/LIBs |
CW 2.x, C4/C5 Clarion, C4/C5 ABC |
PowerRUN is available through CompuServes SWREG #14350 for $13 or via BMT Micro secure web server at: https://secure.falcon-net.net/BMT/order0284.html
It can also be purchased directly from Greg Berthume for $10 using check, money order or cashiers check. For more information, or to download a demo, visit his web site at: http://members.aol.com/gberthume.
Copyright © 1999-2008 by CoveComm Inc. All Rights Reserved. Reproduction in any form without the express written consent of CoveComm Inc., except as described in the subscription agreement, is prohibited.
Clarion Magazine ISSN 1718-9942
One year: $184
(includes all back issues since '99)
Renewals from $134
Two years: $274
Renewals from $224