Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing to dot matrix
Message
From
20/08/2001 07:41:29
 
 
To
20/08/2001 07:28:40
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00538025
Message ID:
00546101
Views:
20
>>Yep, you'd have to write a record in the FoxUser file. Much to difficult, certainly.
>
>Well, yes, this looks like a simple solution, and it would probably solve the problem.
>
>However, a while ago, I just wasn't sure how to do it. So now I am using another solution (open the file with an external editor).
>
>This turns out to have its own complications. Mainly, in VFP I can't:
>
>
>run /n notepad.exe MyTempFile.TMP
>erase MyTempFile.TMP
>
>
>The problem here is that Visual FoxPro would probably erase the temp file before NotePad has a chance to open it. My original solution to this was to erase all temp files on program exit (because of networking, I deleted files older than a certain limit).

There's a simple solution, my API_APPRUN class allows for the modal execution of WinApps using the LaunchAppAndWait() method. It's available for download from the Files Section. Using RUN with the /N parameter runs only WinApps, and runs them asynchronously. API_APPRUN can run either DOS or WinApps, and can run either synchronously or asynchronously. An example:
SET CLASSLIB TO PROCESS ADDITIVE
oApp = CREATEOBJ('API_APPRUN','notepad.exe mytempfile.tmp')
oApp.LaunchAppAndWait()  && runs synchronously
oApp = NULL
erase MyTempFile.TMP
The solution obviously is to simply avoid the RUN command.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform