>Printing reports at night with a 16-bit application (QUEST) requires a single instance, therefore I refer to George's MUTEX class.
>There are many reports to be generated but QUEST can run only one-at-a-time and I must know when the previous QUEST has finished, referring to Ed's Run-App-and-Wait prg.
>I want to combine these two great ideas together!
>Run Quest Print, Wait, After Quest Print spooled start NEXT QUEST.
I don't see the problem here; if you queue up instances of Quest to be run sequentially and use LaunchAppAndWait(), VFP will sit and not execute another line of code until that finishes.
If what you want to do si launch a copy of Quest, then have VFP go off and do something, and periodically check to see if the previous instance has completed, that's really easy, too. You want to make sure that you're using my API_APPRUN class rather than just the sample FAQ code (you can download it from here on UT in th Files Section), and then start up an instance of Quest using launchApp - which runs the program and immediately returns control to VFP. You can periodically check the progress of the application using the object's CheckProcessExitCode() method; if returns a value other than 259, the other instance is done.
The code would look something like this:
SET CLASSLIB TO PROCESS ADDITIVE
oQuest = CREATEOBJ('API_APPRUN',cCmdLineOut, "C:\Gupta\", "HIDE")
oQuest.LaunchApp()
IF oQuest.CheckProcessExitCode() = 259
ELSE
ENDIF
>
>I can't use a timer, end up with dead time...
>IDEAL would be
>=LaunchAppAndWait(cCmdLineOut, "C:\Gupta\", "HIDE")
>
>but the 'handle' is a number, ((that is consistent))
>WHICH is not recognized as a Screen title (as dictated in the MUTEX)
>
>The command line runs an instance of QUEST
>I do not know nor can I seem to assign handle/title for property testing.
>
>Any help would be great.