We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!

VBScript newbie

Options
esuhl
esuhl Posts: 9,409 Forumite
Part of the Furniture 1,000 Posts Name Dropper
A long time ago I wrote scripts in Visual Basic 6.0 and VBA, but I've never used VBScript. So (although I'm a bit rusty) I get the basics of programming/scripting.

I'm thinking of having a play with VBScript. In particular, I want to write a simple script that displays information that is periodically updated without any user input. It'll just be running on a local PC as a VBS file.

I've read that VBScripts can run via either CScript (for console output) or WScript/WSH (for Windows output). Would I be right in thinking that the only way to have a continuously updating display would be to scroll messages in a console window?

Would I need to use different commands with CScript vs WScript...?

Are there any good tutorials I could have a look at to get myself up to speed?

Cheers! :)

Comments

  • AndyPix
    AndyPix Posts: 4,847 Forumite
    Fifth Anniversary 1,000 Posts Name Dropper Photogenic
    Basically, if you want your script to have a console window, you need to use cscript as opposed to wscript.


    If you use wscript you wont have access to the STDOUT etc commands that output to the console..


    So i guess Wscript wouldnt be much use for your intended use.
    Why not use javascript if you want visual stuff ??


    For your editor i would recommend notepad++ as it highlights commands etc in your code and for tutorials there are many on the web such as http://www.tutorialspoint.com/vbscript/


    Hope this helps a bit
    Andy
  • esuhl
    esuhl Posts: 9,409 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    Thanks -- that does help. :-)

    If anyone else is reading this and wants to look at VBScript, I also found this page which has some good info and links (after the initial waffle): https://technet.microsoft.com/en-us/scriptcenter/dd940112.aspx
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 350.8K Banking & Borrowing
  • 253.1K Reduce Debt & Boost Income
  • 453.5K Spending & Discounts
  • 243.8K Work, Benefits & Business
  • 598.7K Mortgages, Homes & Bills
  • 176.8K Life & Family
  • 257.1K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16.1K Discuss & Feedback
  • 37.6K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.