Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

vbscript console write

Posted on 2006-04-28
3
Medium Priority
?
14,360 Views
Last Modified: 2008-01-09
How do I write to the console in vbscript, like C#'s console.writeline?
0
Comment
Question by:arichexe
3 Comments
 
LVL 4

Expert Comment

by:paulgrunner
ID: 16566713
try Debug.Print "message"
0
 

Author Comment

by:arichexe
ID: 16566854
I'm getting the vbscript error, "Object doesn't support this property or method: 'Debug.Print'"
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 200 total points
ID: 16567338
Use WScript.Echo():
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/8dac8dcb-d237-4921-b2ba-0c6a34b60265.asp

    "Outputs text to either a message box or the command console window."

How Echo() behaves depends on how the script was run though.
-->  If it is run with WScript.exe, then a GRAPHICAL msgbox pops up.
-->  If it is run with CScript.exe then the text is echoed out to the Console.

    WScript.Echo "Hello World!"

See here:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/wsh/htm/wsRunCScript.asp
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

810 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