GK> if I just press or give TSE only a path to search in, and
> choose the file via file-selection, the filename isn't displayed?
That's because I used Ask() to get the name, and if you don't
explicitly answer, but instead use a picklist, it doesn't get
a chance to save the name before the macro moves on. I now
realize that I should have used AskFilename(). So try:
proc jInsertFile()
string fn[65] = ""
if AskFilename('File to insert:',fn,_full_path_|_must_exist_)
and Length(fn) Addline() Addline(Format('-':70:'-')) BegLine()
InsertText('-'+SplitPath(fn,_name_|_ext_)+'.begin',_overwrite_)
BegLine() Addline() Addline() InsertFile(fn)
GoToBlockEnd() BegLine() Addline()
InsertText(Format('-':70:'-')) BegLine()
InsertText('-'+SplitPath(fn,_name_|_ext_)+'.end',_overwrite_)
BegLine() Addline()
endif
end
I'm not sure that _full_path_ is necessary, but it doesn't hurt.
This also happens to fix the memory of previous replies that I
couldn't figure out how to get working, and the prompt now
shows up as "File to insert: [d:\sr\]" with the last-visited
directory correctly displayed.
... The only people who never fail are those who never try.
--- SR 2.00 #1019 -!- Ilka Chase
---------------
* Origin: Chowdanet! 20gb Amateur Radio BBS (401-331-5587) (1:323/120)
|