Silverfrost Forums

Welcome to our forums

Invoking a text file and editing it while running a program

6 Feb 2008 3:30 (Edited: 1 May 2008 4:01) #2745

Hello,

I need to open a file from my code which is written in fortran 95. can you tell me which is the subroutine for the same.

I need to edit the file while running my program.

I also need a procedure which will wait for the activity that i am doing in the opened file to terminate.

Thanks, Ajith.

6 Feb 2008 3:59 #2746

This is how I launch Notepad.exe from my program ...

       INTEGER FUNCTION Launch1_FN()
C      -------------------------------
C
C      Launch Notepad as file editor
C
C      -----------------------------------------------------------------
       INTEGER START_PPROCESS@
       IA = START_PPROCESS@('Notepad.EXE',' ')
       Launch1_FN = 1
       END

You could be far more sophisticated than this. For example, check IA to see if Notepad did actually launch/ In the second set of apostrophes, you could put the file name you want to edit.

Launch1_FN is an Integer Function so it can be used as a callback from a Menu item (or a button) in a Clearwin program.

Regards

Eddie

1 May 2008 4:21 #3109

I got the answer for this.

This is what we have to do..

INTEGER i i = START_PROCESS@('Notepad.EXE','textfilename')

Cheers, Ajith

Please login to reply.