PDA

View Full Version : using os_shellexecute



sandyrepope
26-11-2007, 06:35
Is there a way to have os_shellexecute wait until the control returns before the script continues?

I need it to launch a second script and then wait until the script is finishes and closes.

Thanks
Sandy

RobertoBianchi
26-11-2007, 10:42
Hi Sandy,

sorry but isn't possible using the OS_ShellExecute().
May be you should try to use the OS_Shell() function http://www.thinbasic.com/public/products/thinBasic/help/html/index.html with the %OS_SHELL_SYNC mode.

Ciao,
Roberto

Petr Schreiber
26-11-2007, 10:43
Hi Sandy,

maybe better to use OS_SHELL in this case, like in following:


OS_Shell("notepad.exe myFile.txt", %OS_WNDSTYLE_NORMAL, %OS_SHELL_SYNC )


Last equate says we want to run in synchronuously, so script will wait for end of launched process.


Petr

EDIT: Roberto was faster :D