On 4/11/2008 5:53:52 AM, Pauli Lindgren wrote:
>I have been trying to call an
>external Windows program from
>Vedit using system() command,
>but it does not work.
>My macro builds DOS command in
>text register pointed by #53.
>Then it is executed with
>The command may be for example
>as follows (directly pasted
>from the text register):
>If I enter exactly that
>command in DOS window, it
>Aspell runs, reads the text
>from wildfilew.txt and outputs
>the results in aspell.out.
>However, when called from
>Vedit macro with System
>command, it ignores the
>input/output redirection and
>instead expects input from
>console and outputs to
>I then tried with
>System(@(#53),DOS). But that
>CANNOT SHELL OUT. ERROR #87
>I have tested this both on
>Windows XP Home (SP1) and
>Windows XP Pro (SP1). Vedit
I don't understand your fixation with trying to run command programs from Vedit, or even what you are trying to achieve.
It is far better to call vedit to do the task you want.
I usually use cmd files to call vedit e.g.:-
D:\vedit\vpw.exe -e -s2 -c'rinp("#ZTTemp\~ZTTag.inp") call_file(100,"wildfile.vdm")'
REM Call vedit to run DateConvert.vdm on the file, then append date to ~ChangeDate.cmd
Echo D:\vedit\vpw -q -w -g -s2 -ixxx -c"CALLF(39,'DateConvert.vdm') BS(BX) GP(EOL_Pos) RI(33)" %%1 -b D:\Temp\~ChangeDate.cmd 1>> D:\Temp\~ChangeDateBat.cmd
I often use vedit to build cmd files which are then executed
It can be a little challenging to stop the command processor converting reserved characters.
Have you tried using the Windows command escape character '^' in front of '>'
You may also try 1> for stdio or 2> for stderr.