Home Page

 

 

Downloads

 

 

Purchase Information & Online Ordering

 

 

Customer Support


Download
Purchase
Support
Clarion Products
Freeware!
Services
Resources
News
Contact Us
About Us

 

Click for Details!

 

Features

powerRUN allows you to launch programs a number of different ways and to run DOS/Window processes in the background, waiting (or not) until termination.  Includes ShellExecute Code Template for launching a user's default web browser and loading a specific website.  Play wave sound files.  Also included is Jeroen van Helvoort's CWPRINT template which has been modified to take advantage of powerRUN's "Wait Until Completion" capability.

powerRUN is a better solution than Clarion's RUN() function and eliminates RUN's shortcomings.

Using RUN(), the launched program is loaded as the on top and active program. What if you want to run an app in the background? What if you don't want control to return to the calling app until the launched app has completed?  What if you want to set the process Priority in Win95 and WinNT?  This template provides these options as well as others via the WinAPI.

Simply register the global extension template for each app that will utilize it. The global template provides the prototypes for several WinAPI functions as well as the Windows naming conventions. These include files can be disabled via checkboxes (if you already have them). You may also add additional WinAPI prototypes.

EXTENSION TEMPLATE
Each procedure that will utilize powerRUN must have this local extension template inserted. The template interface allows you to specify the powerRUN parameters as well as several others.

Processes that you wish to run in the background and wait until it's completion will require you to create a Generic Window with a Timer setting of 1 and a Cursor setting of Wait. Place a message in the window such as "Processing Occurring - Please Wait...".

The window will be displayed while the process is running in the background (minimized). The process will be called as a procedure.

The template allows you to specify the following:

COMMAND String (with a file lookup button). A prefix of "!" will result in the command being executed literally (ie: usage of variables).

EXECUTION MODE:
0  Run Hidden - User Cannot Access
1  Run as a Foreground Window with app getting focus.
2  Run Minimized with the app getting focus.
3  Run Maximized with the app getting focus.
4  Run Minimized with the calling app retaining focus (background processing).
5  Run as a Window behind the calling app.

Wait for Background App to Complete/Exit (checkbox)  This option forces the routine to use an Accept loop and the WinAPI function GetModuleFileName to determine if the background process has completed.  32bit programs use GetExitCodeProcess.

CreateProcess Priority - 32bit Only
1  Low - Runs only when system Idle
2  Normal - Default
3  High - Can affect multi-tasking, highly responsive.
4  Realtime - Preempts even operating system actions, use with caution.

DISPLAY PREPROCESS MESSAGE (checkbox)
MESSAGE: (ie: Is the Printer Loaded and Ready?)

DISPLAY PROCESS COMPLETION MESSAGE (checkbox)
MESSAGE: (ie: The Process Completed Successfully!)


powerRUN CODE TEMPLATE
The local extension must be added to any procedure that will utilize the code template. This adds the WinExec (CreateProcess for 32bit) execution routine to the routines embed.

Set the extension command string to blank. We won't be using these parameter settings. The code template utilizes the routine which is provided by the extension.

You can embed the powerRUN call at any source code point. For example, if you wanted to have pushbutton access to an app such as Windows Write/WordPad you could place a button on your window, toolbar, etc. In the Control Event Handling, After Generated Code/Accepted embed, select the powerRUN code template.

You are prompted for the Command and Execution Mode (same as extension).

SHELLEXECUTE CODE TEMPLATE
Use to launch a user's default web browser and to load a specific website/URL.  You can specify to display the browser maximized (the default is as a window).  A prefix of "!" will result in the string being executed literally (ie: usage of variables).

You can also pop the user's default email software with the email addressed ie: Mailto:support@mycompany.com  

Use Mailto: without an email address if you want to allow the user to select an email recipient.

Use Mailto:greg@berthume.com  to specify an email address.

Use Mailto:greg@berthume.com?Subject=powerRUN is great!  to set the subject line.

PLAY WAVE FILE CODE TEMPLATE
Use to play wave files before/after processes are run or whatever!  You are prompted for the .wav file name.


RUNNING DOS PROCESSES/APPS
The powerRUN template solution also comes with a generic PIF and BAT to allow you to run DOS processes in the Background and force your CW app to wait until it completes.

The PIF and BAT files can receive up to 6 parameters. Modify as necessary. The PIF is required to force the DOS window to Close Window on Exit and Execute in the Background. You can use the PIF to execute any DOS command or program, ie: COPY

See the Download procedure in the demo app for example of using the PIF, BAT and powerRUN combination.

The powerRUN template kit works with all versions of CW and is 16/32 bit and multi-dll compatible.

Included with powerRUN for free is a template for using CWPRINT, courtesy of Jeroen van Helvoort. It has been modified to use powerRUN's 'Wait Until Completion" capability.  CWPRINT cannot be launched in the background.

powerRUN also comes with the WinTop utility developed by the MicroSoft Windows 95 "Kernel Team". This is handy program for monitoring memory and cpu usage by application and threads. It also allows you to check running app's priority setting which the demo program demonstrates.


Add powerRUN to your RAD arsenal TODAY!

Go Back

 

Copyright ©2006 Berthume Enterprises LLC, All Rights Reserved.