replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Invoking a text file and editing it while running a program
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invoking a text file and editing it while running a program

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
AjithSivakumar



Joined: 04 Jan 2008
Posts: 14

PostPosted: Wed Feb 06, 2008 4:30 pm    Post subject: Invoking a text file and editing it while running a program Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2396
Location: Yateley, Hants, UK

PostPosted: Wed Feb 06, 2008 4:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
AjithSivakumar



Joined: 04 Jan 2008
Posts: 14

PostPosted: Thu May 01, 2008 5:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group