Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RUN mimized and wait

Status
Not open for further replies.

JanyMoon

Programmer
Oct 17, 2005
12
SI
I try to use RUN from VFP7 and make it
minized and with wait parameter.
eg.

RUN test.bat works ok but in window

RUN /N test.bat work ok but no wait
 
For now i found this solution

in Test.Bat:
-----------------------------------------

@echo off
cls
echo Test > Test.Txt
rem do some stuff, eg. pack data with zip program
....
Del Test.Txt


in VFP7:
-----------------------------------------
Run /N7 Test.Bat
inkey(2) && wait 2 second just in case
if file( "Test.Txt" ) && wait to end of bat file
inkey(2)
endif
note eg. send zip data to ftp server


 
mistake in VFP7, this is better:

do while file( "Test.Txt" ) && wait to end of bat file
inkey(2)
enddo
 
You can define th window state in foxrun.pif, located in Home(). /N is for starting without waiting for dos to return, so don't use that parameter and foxpro does wait.
The help might be misleading in that it says you _should_ pass this if starting another windows application. Even in that case you only need it if you want that application to launch and not stop your application. N is simply for NOWAIT.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top