Run con espera

10/06/2004 - 16:52 por Claudio | Informe spam
Necesito correr un programa externo con run y esperar a que el mismo
termine para ejecutar otro inmediatamente.

-
PortalFox :: Nada corre como un zorr
http://www.portalfox.co

PortalFox - NNTP Forum Gatewa
 

Leer las respuestas

#1 Alex Feldstein
11/06/2004 - 00:48 | Informe spam
On Thu, 10 Jun 2004 07:52:47 -0700, "Claudio"
wrote:

Necesito correr un programa externo con run y esperar a que el mismo
termine para ejecutar otro inmediatamente.



Usando WSH:
#define SINCRONICO .T.
#define ASINCRONICO .F.
#define SW_SHOW_NORMAL 1
#define SW_SHOW_MINIMIZED 2
#define SW_SHOW_MAXIMIZED 3
oShell = createobject("WScript.Shell")
oShell.Run("notepad.exe",SW_SHOW_NORMAL,SINCRONICO)


o usando WinAPI:
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
ShellExecute( 0, "Open", "wordpad.exe", "myfile.txt", "c:\temp", 1 )



Alex Feldstein
________________________________
Microsoft Visual FoxPro MVP
Please respond in the public groups so that everybody
can benefit from the exchange.
Favor de responder en los foros públicos asi todos se benefician.
(Address scrambled with ROT-13)

Preguntas similares