PC Review


Reply
Thread Tools Rate Thread

cmd interface

 
 
gabor salai
Guest
Posts: n/a
 
      27th Oct 2004
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?



 
Reply With Quote
 
 
 
 
Al Dunbar [MS-MVP]
Guest
Posts: n/a
 
      28th Oct 2004

"gabor salai" <(E-Mail Removed)> wrote in message
news:%231WGiY$(E-Mail Removed)...
> 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


 
Reply With Quote
 
David Candy
Guest
Posts: n/a
 
      28th Oct 2004
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 [MS-MVP]" <alan-no-drub-(E-Mail Removed)> wrote in message news:%(E-Mail Removed)...
>
> "gabor salai" <(E-Mail Removed)> wrote in message
> news:%231WGiY$(E-Mail Removed)...
>> 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
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert user interface of 2007 to the old 2003 or XP interface? Bibico Microsoft Word Document Management 2 15th Dec 2008 06:34 AM
'IWebPartField.GetFieldValue' in explicit interface declaration is not a member of interface rote Microsoft ASP .NET 0 30th Oct 2008 07:36 AM
Smart Pointers (SQLDMO): Acquiring SQLServer2 interface from SQLServer interface? Mark Findlay Microsoft Dot NET 1 23rd Dec 2005 10:08 AM
.net COM interface: how to interface a fuction returning array learner Microsoft VB .NET 0 3rd Oct 2005 03:55 AM
Reflection: CreateInstance(Type) of class that supports known interface - Get actual interface reference to object? Chris Morse Microsoft VB .NET 10 16th Jan 2004 01:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:45 PM.