cmd interface

  • Thread starter Thread starter gabor salai
  • Start date Start date
G

gabor salai

is it posible to have some script [vbs] that may retrieve content of some
existing running cmd prompt instance?
i should expect to retrieve things like buffer's content as text string
array, maybe also screen attributes or cursor position, or even currently
defined env vars of that instanc, etc...
is it [technicaly] possible? is there some exposed interface to connect to?
 
gabor salai said:
is it posible to have some script [vbs] that may retrieve content of some
existing running cmd prompt instance?

The closest I can think of is to cut and paste between the script and the
cmd prompt console.
i should expect to retrieve things like buffer's content as text string
array, maybe also screen attributes or cursor position, or even currently
defined env vars of that instanc, etc...

I would expect *not* to receive these items...
is it [technicaly] possible? is there some exposed interface to connect
to?

Almost anything might be possible; but it is best to concentrate on what is
likely to be possible within one's own lifetime ;-)

It would be more likely to be possible if CMD exposed a COM interface. But
aside from the simple fact that it doesn't, there would be precious little
to be gained by batch programmers. As for vbscripters, I find that
environment so much more capable than the batch environment, that there
would be little to gain there either.

/Al
 
It's certainly possible. A program can ask a console window what the text, or what arrribute the text is. See the console functions in PSDK. But you need to write the program yourself.

--
----------------------------------------------------------
http://www.uscricket.com
Al Dunbar said:
gabor salai said:
is it posible to have some script [vbs] that may retrieve content of some
existing running cmd prompt instance?

The closest I can think of is to cut and paste between the script and the
cmd prompt console.
i should expect to retrieve things like buffer's content as text string
array, maybe also screen attributes or cursor position, or even currently
defined env vars of that instanc, etc...

I would expect *not* to receive these items...
is it [technicaly] possible? is there some exposed interface to connect
to?

Almost anything might be possible; but it is best to concentrate on what is
likely to be possible within one's own lifetime ;-)

It would be more likely to be possible if CMD exposed a COM interface. But
aside from the simple fact that it doesn't, there would be precious little
to be gained by batch programmers. As for vbscripters, I find that
environment so much more capable than the batch environment, that there
would be little to gain there either.

/Al
 
Back
Top