Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API_AppRun vs. launch an app and wait
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00680456
Message ID:
00681283
Vues:
161
>>Thanx,
>>
>>Now I have it. thanx, Any suggestions on how to check if an app that you launched with all of this scripting is still running. That would be very helpful.
>>
>Neil,
>
>Well, VFP won't get control back until the script finishes executing. Now if the script is controlling the application, it won't terminate until it's finished what it has to do. This should include terminating the app. However, if you wish the app left open, you could use something like my Is_Run32 from the download section. All it requires is the known portion of the title bar. You could simply put VFP into a loop while Is_Run32 is return a non-zero value.


Hi George,
I am enjoying is_run32. Thank you for this little gem. I noticed that it returns the handle to the window that I am examining. Your documentation advises that the handle could be used for other API stuff. I got to thinking after reading that. Since I am controlling a cad cam program via SendKey commands, there is a possibility that my SendKey that causes an exit from the cad cam app, could fail because of a long file loading etc. I use is_run32 in a loop to determine if the cad cam app closes. But I also included a little counter in the loop so if the loop is transversed more that 50 times I have to assume that my sendkey never closed the app. Could I use the handle returned by is_run32 in an API thing or wsh construct to close the app. A little code would be appreciated.

I have another question about API etiqueette and housekeeping. Over the years you have posted code to UT which utilizes declare dll stuff. I have yours and other developer's code in a classlibrary called outsiders.prg
What happens when your code and several other developer's code make the same declare statement. Are there any toes being stepped on when 2 or more functions make the same declare statement? Should I just move everybodies declare statements to the top and remove duplicates? Should I have a clear dll statement in some cleanup routine?

Regards,
Dr. G. (Neil)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform