Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RUN /N vs WSH
Message
 
To
15/05/2008 10:47:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01317295
Message ID:
01317314
Views:
15
Look at the windows START command. I run all external programs using that - RUN START parameters...

>I use the following code to run a command line program:
>
>
>lcCommand = 'RUN /N2 oDraw.cProgDrv + ':\New Fox\advanced_pdf_tools\pdftools.exe -i '+;
>'"'+ cDestination +'"'+'-f "-90" -x "0 0 36 24"'
>
>&lcCommand
>
>
>
>It works fine. However, I need to be able to wait for the program to complete prior to continuing with the remaining code. I have read that it may be better to use WSH but I am not sure of the correct syntax. I have tried the following with no success:
>
>
>lcCommand = 'RUN /N2 oDraw.cProgDrv + ':\New Fox\advanced_pdf_tools\pdftools.exe -i '+;
>'"'+ cDestination +'"'+'-f "-90" -x "0 0 36 24"'
>
>oShell = CREATEOBJECT('WScript.Shell')
>oShell.Run(lcCommand,2,.T.)
>
>
>Any suggestions on what I am doing wrong or alternate solutions would be greatly appreciated.
>
>Thanks
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Reply
Map
View

Click here to load this message in the networking platform