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:
00680498
Vues:
132
>>Why not use WHS to run script?
oShell = CREATEOBJECT("WScript.Shell")
>>oShell.Run("myscript.vbs", 0, .T.)
>>
>>>Hi,
>>>
>>>I have been using API_AppRun to lauch applications from vfp. I like the LaunchAppAndwait() method because it does just what it's name implies. VFP waits around until the launched app closes. Does anyone know how to get launchAppAndWait() to run a .wsf file. I want to run this script and have vfp wait until the script is completed. Or..... is there a way not to use API_AppRun and use a different technique to launch a wsf from within vfp and have vfp wait until the script is done?
>>>
>>>Thanx,
>>>Dr.G. (Neil)
>
>Let me show you an example of what I am doing:
>
>wait window "before the code runs.."
>WshShell=createobj("WScript.Shell")
>WshShell.run("myapp.exe")
>WshShell.sendKeys("IOY")
>WSHShell.sendkeys("%X")
>wait window "we are done"
>
>You see... I don't want wait window "we are done" to run until myapp.exe closes. How do you do that.

Include, the .T. in the run command as in Sergey's example. Only difference is the window style parameter.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform