Topic: Can Wildfile read S&R string from a file? (1 of 4), Read 71 times
Conf: Wildfile, Other macros
From: Peter Rejto
Date: Monday, March 05, 2001 09:53 PM

Hi.
I would like to tell the WILDFILE macro to read its search and replacement strings from a file. Is this possible?
Thanks,

 


Topic: Re: Can Wildfile read S&R string from a file? (2 of 4), Read 78 times
Conf: Wildfile, Other macros
From: Ted Green
Date: Tuesday, March 06, 2001 11:37 AM

At 09:53 PM 3/5/2001 -0500, you wrote:
>I would like to tell the WILDFILE macro to read its search and replacement strings from a file. Is this possible?

Although not yet well documented, VEDIT+ 5.20 has "Input redirection" for precisely this purpose.

Search the on-line help for "Input (keyboard) Redirection" and examine the supplied WILDFILE.INP file:

! VEDIT input redirection file for WILDFILE macro.
!
! To use it, give the command:
!
! vpw -c'rinp("wildfile.inp") call_file(100,"wildfile.vdm")'
!
! Replace "" with "" in all
! c:\typeset\*.txt and c:\typset\*.prn files.
!
c:\typeset\*.txt ! Select first group of files
c:\typeset\*.prn ! Select next group of files
! Blank line ends file selection
%r ! Select [R]eplace
! Search string
! Replace string
%d ! Select [D]isplay
%n ! Select [N]o to "More" option
! Press any key to continue
3 ! Select [3] to exit macro


Ted.
-------------------------------------------------------------------------
Ted Green (ted@...) Greenview Data, Inc.
Web: http://www.... PO Box 1586, Ann Arbor, MI 48106
Tel: (734) 996-1300 Fax: (734) 996-1308 VEDIT - Text/Data/Binary Editor

 


Topic: Re: Can Wildfile read S&R string from a file? (3 of 4), Read 85 times
Conf: Wildfile, Other macros
From: Ian Binnie
Date: Wednesday, March 07, 2001 10:36 PM

I tried this and got it to work without a lot of trouble (where does Vedit look for .inp file?)

However when I tried to re-reun Wildfire I had a lot of problems.

Eventually I ended up with the file below (which works).
The problem seems to be that the line with white space before a comment did not emulate a blank line.
Why it does for the first run of Wildfile is a mystery.

! VEDIT input redirection file for WILDFILE macro
!
!
d:\traf\s*.txt ! Select first group of files

! Blank line ends file selection
%m ! Select [M]acro
arte.vdm ! The macro name
%d ! Select [D]isplay
%n ! Select [N]o to "More" option
! 07Press any key to continue
%1 ! Select [1] to run again
d:\traf\m*.txt ! Select first group of files

! Blank line ends file selection
%m ! Select [M]acro
arfix.vdm ! The macro name
%d ! Select [D]isplay
%n ! Select [N]o to "More" option
! 07Press any key to continue
3 ! Select [3] to exit macro

 


Topic: Re: Can Wildfile read S&R string from a file? (4 of 4), Read 82 times
Conf: Wildfile, Other macros
From: Peter Rejto
Date: Saturday, March 17, 2001 05:54 PM

On 3/6/2001 11:37:20 AM, Ted Green wrote:
>At 09:53 PM 3/5/2001 -0500, you
>wrote:
>I would like to tell the
>WILDFILE macro to read its search and
>replacement strings from a file. Is this
>possible?

Although not yet well
>documented, VEDIT+ 5.20 has "Input
>redirection" for precisely this
>purpose.

Search the on-line help for
>"Input (keyboard) Redirection" and
>examine the supplied WILDFILE.INP
>file:

! VEDIT input redirection file
>for WILDFILE macro.
!
! To use it, give
>the command:
!
! vpw
>-c'rinp("wildfile.inp")
>call_file(100,"wildfile.vdm")'
!
Ted,
Thanks for your suggestion. I tried it and I got the error message "label is missing; widlfile.vdm "
Could you give me a hint what might be wrong with my vpw.exe installation.

I also did some experimentation: I looked up the various invocation options in the on line help. I learned that with the -c option the command can be deli meted by quotation marks.
First, I thought your single quotation mark might be an e-mail inaccuracy. I also tried it with double quotation marks. Here I got an incomplete command error message.
Second, I thought that may be my startup.vdm file interferes with the invocation. So, I tried the the +c option instead of your -c
option. This option put me in a vedit command window, but I got the same missing label message; wildfile.vdm.

I can not think of any other options. Looking forward to hearing from you. Thanks,

-peter.

>Replace "" with "" in all
!
>c:\typeset\*.txt and c:\typset\*.prn
>files.
!
c:\typeset\*.txt ! Select
>first group of files
c:\typeset\*.prn
>! Select next group of files

>! Blank line ends file selection
%r
>! Select [R]eplace
! Search
>string
! Replace
>string
%d ! Select
>[D]isplay
%n ! Select
>[N]o to "More" option

>! Press any key to continue
3
>! Select [3] to exit
>macro


Ted.
---------------------------
>----------------------------------------
>------
Ted Green (ted@...)
>Greenview Data, Inc.
Web:
>http://www.... PO
>Box 1586, Ann Arbor, MI 48106
Tel: (734)
>996-1300 Fax: (734) 996-1308 VEDIT -
>Text/Data/Binary Editor