Hi,
I'm writing a conversion macro that when run manually, is assigning
a couple numeric registers the buffer numbers for the source and
target data. The output file is then named based on the source file
name.
EG:
begin macro
..
#10 = Buf_Num
#11 = Buf_Switch(Buf_Free())
if (!Is_SaveAs) {
File_Open("|@(104).OUT",OVERWRITE|NOEVENT)
// } else {
// File_Open_Write(PATHNAME,OVERWRITE|NOEVENT)
}
Buf_Switch(#10)
..
What is puzzling me, is that if I use a command line like
"vpw -x mymacro input.txt -a output.txt" my 'source' becomes
output.txt with the content of input.txt and the output is named
according to the "|@(104).OUT" bit as above.
Is there a way to identify or specify which buffer the "-a "
uses? I'm guessing part of my problems are because I am using an
additional buffer (?).. In-place replacement of the source proved a
little tricky as it's not a 1:1 replacement, thus why I am creating
the additional buffer for the time being.
While poking around, it seems the "Is_SaveAs" flag is the proper way
to check for a "-a" parameter.. Is there a specific internal string
that I can get the -a filename value specifically or is it neccesary
to parse it from CMD_LINE?
--
John
VEDIT SN: 95651
VEDIT (DOS) Ver. 6.12.1 05/07/04
VEDIT (32-Bit) Ver. 6.12.1 05/07/04
VEDIT Pro (64-Bit) Beta Test Ver. 6.12.1 05/07/04
Windows 2000 (5.0.2195 Service Pack 4)