Solved

write to command line

Posted on 2003-11-11
8
310 Views
Last Modified: 2010-08-05
I am writing an application that runs from a command prompt. I would like to write to the command line instead of using msgbox.
0
Comment
Question by:mittel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 9726192
This can and cannot be done depending on how you want to look at it.

Yes...it is possible to create a VB App that uses a console window for input/output.  HOWEVER, the VB app creates its own console window to achieve this.  Here are two links on the topic:

http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q171/6/54.asp&NoWebContent=1

http://internettrash.com/users/fdb/cons.htm

I could not find one example of a VB App sending output to the console window that it was executed from.

One sloppy possiblity that will definitely not be foolproof:

Use the FindWindow API to get a handle to the command window.  Put the message you want in the clipboard.  Activate the command window.  Use send keys to Edit --> Paste your message into the command window.

Any Experts want to implement that? =)

Idle_Mind
0
 
LVL 5

Expert Comment

by:fantasy1001
ID: 9727118
Questioner:
Can I ask what is the intention you implement this method?

~ fantasy ~
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 9872474
What did you decide to do Mittel?
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 

Author Comment

by:mittel
ID: 9896203
To fantasy: I wanted to write an application like that using C where you can write back to the command window.

To idle mind: Although your solutions sounded very promising, I ended up just writing to a log file.

mittel
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 10165508
I recommend the question be closed points refunded.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10537240
mittel, an EE Moderator will handle this for you.
Moderator, my recommended disposition is:

    Refund points and save as a 0-pt PAQ.

Dan Rollins -- EE database cleanup volunteer
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 10578206
PAQed, with points refunded (125)

ee_ai_construct
Community Support Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question