Topic: Qustion about the Vedit System( ) command. (1 of 3), Read 44 times
Conf: Other, General, etc.
From: Peter Rejto
Date: Saturday, June 02, 2007 02:46 PM

Hello,

I have a question about running the Vedit System( ) command
when the argument is coming from a Vedit T-Register.
I think that I have checked that the content of the T-Register is a valid Win2K command. So, I pasted the content of that T-Register to the Start>Run window of Win2K
and Win2k indeed, could execute it.


Actually, this is not a high priority item for me it is just bugging me. Possibly, it was not the purpose of the System( ) command, to run complex Win2K commands? Possibly,
I made a typo after all and I am asking Vedit to execute a Win2k command, that Win2K itself can not execute.

There are too many possibilities, and I just would like to know the answer.

Here are the specifics:

If I put some Win2K commands into a Vedit Text Register, I can execute them via the Vedit System( ) command.

An example of a Win2K command which I can execute this way is the "dir" command. Specifically, if I put the string "dir" into T-Reg 69 then the Vedit commands

System("dir")

and

System(@69)

are equivalent.


Next I tried to replace the string "dir" with a more complex Win2K command. Specifically, I tried the Win2k command:

cmd %comspec% /k DOSKEY /?


I have no problem running the Vedit command:

System("cmd %comspec% /k DOSKEY /?").


However, if I put the string

"cmd %comspec% /k DOSKEY /?"

into, say T_register 79 then the Vedit command

System(@79)

gives me a CAN NOT SHELL OUT, ERROR 2 message.


Thanks again,

-peter.

 


Topic: Qustion about the Vedit System( ) command. (2 of 3), Read 46 times
Conf: Other, General, etc.
From: Ian Binnie
Date: Sunday, June 03, 2007 02:13 AM

The current system launches a 16 bit WOW using NTVDM.
64 bit Windows no longer support this.

I am assuming that vedit calls one of the .pif, because a system() call would not do this.

I note that deleting the .pif generates an error.

Would it not be better to use one of the _spawn API, or at least add a 32bit system call.

There can't be too many 16 bit applications out there any more (Vspell?)

 


Topic: Qustion about the Vedit System( ) command. (3 of 3), Read 52 times
Conf: Other, General, etc.
From: Peter Rejto
Date: Sunday, June 03, 2007 09:41 AM

On 6/3/2007 2:13:07 AM, Ian Binnie wrote:
>The current system launches a
>16 bit WOW using NTVDM.
>64 bit Windows no longer
>support this.
>
>I am assuming that vedit calls
>one of the .pif, because a
>system() call would not do
>this.
>
>I note that deleting the .pif
>generates an error.
>
>Would it not be better to use
>one of the _spawn API, or at
>least add a 32bit system call.
>
>There can't be too many 16 bit
>applications out there any
>more (Vspell?)


Thanks Ian,

I also studied the online Macro Reference Manual and I believe that I have found the relevant part:

"Although not available for all string arguments, all filename arguments plus
the Search( ), Replace( ),Match( ), Statline_Message( ), System( ) and Goto
commands can use a text register as a portion of the string argument."

In other words, for the System( ) command for many but not all string arguments I "can use a text register as a portion of the string argument."

So, what I have done was to find one of the string arguments for which this can not be done.

I have learned something really interesting and a big thank you to Ted for writing such an excellent manual.


At the same time a big thank you to Ian, who told me where to look for such a string argument.


Thanks again, gentlemen:

-peter
-peter