Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Starting from Scratch > Exploring a Script: Step-by-Step Exercises

Exploring a Script: Step-by-Step Exercises

In this section, you will explore the four parts of a script written in VBScript language. This section also provides practice in using comments to add notes to an existing script.

1.
Open ExploringVBS.vbs in Notepad.exe. It is located in the My Documents\Microsoft Press\VBScriptSBS\ch01\StepByStep folder.

2.
Add comments that identify each section of the script. (Make sure to include all four parts of the script: header information, reference information, worker information, and output information.)

3.
Save the script with a different file name, such as YourNameExploringVBS.vbs.

4.
Delete the entire Header information section.

5.
Save the script and then try to run it. Does it run?

6.
Add the Option Explicit command again and save the file. Now does it run?

7.
Put a comment mark (’) in front of Option Explicit and save the file. Does it run?


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint