Message Gerrit Kuehn (2:241/1130.16) wrote to *.*:
GK> Hallo *.*!
GK> When I insert a file into a TSE-document, I'd like to have added two
GK> lines like this:
GK> -filename.begin-----------------------------------------------------
GK> ----------
GK> [...inserted_file...]
GK> -filename.end-------------------------------------------------------
GK> ----------
GK> Does anybody have a macro or something like that does the trick?
You should really have a play at creating something like this yourself. This
is the best part of tse its ease of creating quick macros to do tasks like
this. Create a few line of code, compile and then run to see what the result
is as expected.
Offhand I don't know how to save the inserted file as a variable so what I
id
was save the currfilename as a variable and then quit the file later.
Example of above...
-f:\up\2\finsert.s.begin---------------------------------
proc insertfilem()
string savefilename[50] = ""
pushposition()
editfile()
savefilename = currfilename()
begfile()
markline()
endfile()
markline()
popposition()
begline() creturn()
inserttext("-" + savefilename + ".begin---------------------------------")
creturn()
copyblock()
gotoblockend()
creturn()
inserttext("-" + savefilename +
".end------------------------------------") creturn()
editfile(savefilename)
quitfile()
popposition()
gotoblockbegin()
unmarkblock()
up(2)
end
insertfilem()
-f:\up\2\finsert.s.end------------------------------------
Phil..
pthornton@sawasdi.apana.org.au
---
---------------
* Origin: **Sawasdi BBS** sawasdi.apana.org.au 61 8 82617802 (3:800/846)
|