
QB4.5 External Program Launch Problem
Here's a take off on Judson's method:
Make sure you load QB with the /L switch
test.exe
REM If errorlevel is 2 or greater the message will display
if errorlevel 2 ECHO Running Test.bat
Make the file test.exe from the basic program below:
'pass an error level to dos and exit
'Include the following declaration in your program:
DECLARE SUB ErrorExit ALIAS "_exit" (BYVAL Errorlevel%)
PRINT "Running test.exe"
Errorlevel% = 2
CALL ErrorExit(BYVAL Errorlevel%)
If you run this program from the environment it will simply kick you out of
QB back to the dos prompt. To work, it has to be run from the exe.
ChasG
--
---
Delhi, La., Gateway to: Poverty Point Archaeological Center
Site of the oldest pre-historic civilization in North America
Personal Home Page:,.............HTTP://cust2.iamerica.net/cgodard
Business Home Page:..............HTTP://cust.iamerica.net/ggodard
KA5EJW Advanced Class Ham FCC General Class Radiotelephone
Quality Tuner Service.... HTTP://cust2.iamerica.net/cgodard/QualityLinks.htm
Quote:
>: There is a method which works, though it may sound a bit kludgy. Create
>: a BAT file, and execute the QB4.5 program from it. If the QB4.5 program
>: needs to run another program, then it can create a temporary file. When
>: the QB4.5 program exits, the BAT file can check for the existence of the
>: temporary file. If it exists, then the BAT file deletes the temporary
>: file and runs the second program.
>: Another more flexible possibility is that the QB4.5 program create
another
>: BAT file, and the original BAT file can test for its existence, and CALL
>: it if it exists. This way the QB4.5 program can easily cause any other
>: program of any name to be executed on the fly, or even do other commands
>: this can happen with a clean screen display.
>Thanks, Judson. Kludgey=good. Very clever solution. :)
>Paul