>>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()
oApp = NULL
erase MyTempFile.TMP
The solution obviously is to simply avoid the RUN command.