Results 1 to 2 of 2

Thread: How to debug vbscript

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 1999
    Location
    San Diego, Ca , USA
    Posts
    44

    Question

    Hi Everyone,
    I download Microsoft Script Debugger and tried the following script by opening notepad ans saved as test1.vbs, then I went to dos command and typed wscript //x test1.vbs
    I got this error
    Script: c:\vbscript\test1.vbs
    line: 1
    Char: 1
    Error: expected statement
    code: 800a0400
    source: microsoft vbscript compilation

    Did I download the correct debugger?
    What is the correct way of compiling?
    Is the extention correct.
    Can someone give me a hint or help in how to debug it, I know visual basic but I am starter in vbscript. Can you give me valuable book names for vbscript. Thanks in advance.

    <HTML>
    <HEAD></HEAD>
    <BODY>
    <H1> Introductory Example </H1>
    This is test.
    <HR>
    <SCRIPT LANGUAGE=VBScript>
    Document.Write "Hi <BR>"
    </script>
    </BODY>
    </HTML>

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    OK so I don't know anythiug about stand alone vbs scripts but this bit of code opens notepad from a .vbs file

    Code:
    
    Option Explicit 
    
    Dim oShell
    
    Set oShell = WScript.CreateObject("WScript.Shell")
    
    oShell.Run "notepad.exe", 1, FALSE
    
    WScript.Quit
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width