Expected statement error

Author Message
isoda

  • Total Posts : 4
  • Scores: 0
  • Reward points : 0
  • Joined: 5/2/2009
  • Status: offline
Expected statement error Saturday, May 02, 2009 7:15 PM (permalink)
0
Im embarrassed to even post this! Its the simplest script possible and yet I have a problem

c:> cscript test.vbs //nologo
wscript.echo "Testing!"

Error on line one, 3rd char, error is Expected Statement
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: online
    RE: Expected statement error Sunday, May 03, 2009 12:30 AM (permalink)
    0
    So you have this line:

    wscript.echo "Testing!"


    as the only line in a file called test.vbs?
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2
      isoda

      • Total Posts : 4
      • Scores: 0
      • Reward points : 0
      • Joined: 5/2/2009
      • Status: offline
      RE: Expected statement error Sunday, May 03, 2009 5:37 AM (permalink)
      0

      ORIGINAL: ebgreen

      So you have this line:

      wscript.echo "Testing!"


      as the only line in a file called test.vbs?




      OH Am I supposed to put the first line when I call it from the command prompt?
       
      #3
        ebgreen

        • Total Posts : 8227
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: online
        RE: Expected statement error Monday, May 04, 2009 2:48 AM (permalink)
        0
        Here is how to execute a VBScript (well one way at least):

        1) Open Notepad.exe
        2) In Notepad type this line:
                WScript.Echo "Test"
        3) Save the Notepad file as C:\temp\test.vbs
        4) Close Notepad
        5) Open Windows Explorer
        6) Navigate to the C:\temp folder
        7) Double Click the test.vbs file
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4
          isoda

          • Total Posts : 4
          • Scores: 0
          • Reward points : 0
          • Joined: 5/2/2009
          • Status: offline
          RE: Expected statement error Monday, May 04, 2009 5:06 PM (permalink)
          0
          I got it thanks for your help! =]
           
          #5

            Online Bookmarks Sharing: Share/Bookmark

            Jump to:

            Current active users

            There are 0 members and 1 guests.

            Icon Legend and Permission

            • New Messages
            • No New Messages
            • Hot Topic w/ New Messages
            • Hot Topic w/o New Messages
            • Locked w/ New Messages
            • Locked w/o New Messages
            • Read Message
            • Post New Thread
            • Reply to message
            • Post New Poll
            • Submit Vote
            • Post reward post
            • Delete my own posts
            • Delete my own threads
            • Rate post

            2000-2012 ASPPlayground.NET Forum Version 3.9