View previous topic :: View next topic |
Author |
Message |
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Wed Feb 06, 2008 4:30 pm Post subject: Invoking a text file and editing it while running a program |
|
|
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.
Last edited by AjithSivakumar on Thu May 01, 2008 5:01 pm; edited 1 time in total |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2396 Location: Yateley, Hants, UK
|
Posted: Wed Feb 06, 2008 4:59 pm Post subject: |
|
|
This is how I launch Notepad.exe from my program ...
Code: |
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 |
|
Back to top |
|
|
AjithSivakumar
Joined: 04 Jan 2008 Posts: 14
|
Posted: Thu May 01, 2008 5:21 pm Post subject: |
|
|
I got the answer for this.
This is what we have to do..
INTEGER i
i = START_PROCESS@('Notepad.EXE','textfilename')
Cheers,
Ajith |
|
Back to top |
|
|
|