Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Keyboard emulation under programatic control
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00678501
Message ID:
00678854
Views:
18
>Hi George,
>Thanx for the referance to the article. It worked. I have a question
>
>how come:
>wshShell=createobj("WScript.Shell")
>wshShell.Run("calc")
>works just fine
>
>but.....
>
>wshShell.run("c:\program files\cadcam\cadcam.exe")
>does not work.
>If I place "c:\program files\cadcam\cadcam.exe" in the RUN textbox, it will work but not when I use the above syntax in the scripting host
>
>And....
>what is the vfp syntax for wshShell.Sleep 100? I tried wshShell.run(100) and that did not work.
>
>Regards,
>Dr. G. (Neil)

The problem you're having is with the embedded spaces in the file name. The string should include the quote marks so the shell realizes it's an LFN.

The answer to the second part is to use the Sleep API call, since VFP doesn't have access to the WScript object itself. You'll find a sample of this in the article on the VFUG site.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform