vbscript console write

Posted on 2006-04-28
Last Modified: 2008-01-09
How do I write to the console in vbscript, like C#'s console.writeline?
Question by:arichexe
    LVL 4

    Expert Comment

    try Debug.Print "message"

    Author Comment

    I'm getting the vbscript error, "Object doesn't support this property or method: 'Debug.Print'"
    LVL 85

    Accepted Solution

    Use WScript.Echo():

        "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:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
    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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    761 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now