Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

shell

Status
Not open for further replies.

Swede

Programmer
May 17, 2001
6
US
Does anyone know if there is a way to insert a file that you found using a strfind into another script on a specific line?
 
Yes,
you can handle an uncompiled *.was file like any other text.
When you find the line of text you wish to insert, you could open the script using
fopen 0 "scriptname.was" readwrite text
Then could you use fgets to find the line above where you want the script appended. Use the fputs command to add the string to the script.

if compile "scriptname.was" ; compiles the .was
chain "scriptname.wax" ; chains the .wax file.
Endif

I found myself saying "could" a lot because whatever dynamic information you are trying to include could probably be handled better through .ini file variables.

Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top