Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 510 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
510
Dung lượng
12,79 MB
Nội dung
[...]... Introducing theWSHandVBScript Chapter 1: Getting Started with theWSHandVBScript Chapter 2: Overview of the Windows Script Host This page intentionally left blank 1 C H A P T E R Getting Started with theWSHandVBScript n this chapter, you’ll be introduced to a number of topics These topics include a high-level overview of the Windows Script Host (WSH) andVBScript You will learn how theWSHand VBScript. .. meaning that MicrosoftandMicrosoft alone owned and controlled VBScript Chapter 1 • Getting Started with theWSHandVBScript 15 Microsoft has since created a modified version of VBScript that is designed to work with theWSH This version of VBScript lacks many of the features found in browser-based versions of VBScriptFor example, it does not work with forms and frames Then again, as a WSH scripting... execution hosts • TheWSH core object model The relationship of each of the components to one another is shown in Figure 1.5 Figure 1.5 The components that comprise theWSH 6 MicrosoftWSHandVBScript Programming fortheAbsolute Beginner, Second Edition WSH Scripting Engines A script execution engine is a program that processes (interprets) the statements that make up scripts and translates them into machine-readable... Basics.” This chapter begins your VBScript education You’ll learn about VBScript s core and run-time objects and their properties and methods You’ll learn about other VBScript elements including VBScript s built-in functions, syntax rules, and output methods You’ll also learn about various WSH output functions xviii MicrosoftWSHandVBScript Programming fortheAbsolute Beginner, Second Edition • Chapter... providing another invitation to play the game appears Chapter 1 • Getting Started with theWSHandVBScript 5 By the time you have created and run this game, you’ll have learned the fundamental steps involved in writing and executing VBScripts At the same time, you will have prepared yourself for the more advanced programming concepts developed in later chapters, including how to use theWSHand VBScript. .. Yet VBScript is a powerful scripting language from which you can learn even the most complex programming concepts such as how to perform object-based programming Unlike Visual xvi MicrosoftWSHandVBScript Programming fortheAbsolute Beginner, Second Edition Basic, VBA, and many other programming languages, there is no complex development environment to learn In fact, you can create all your VBScripts... Run, and then type CMD and press the Enter key As you can see, when the Windows Console first opens, it displays information about the version of Windows in use andMicrosoft s copyright information; then the command prompt appears Just to the right of the command prompt, you’ll see a blinking cursor or underscore character This character indicates that the command prompt is ready to accept input For. .. see, the last line in the output is the Windows command prompt The Windows shell redisplayed the command prompt as soon as the DIR command completed, allowing for the entry of another command For example, if I have a VBScript named Hello.vbs located in a folder named Scripts on the computer C: drive, I could now execute it by typing CScript C:\Scripts\Hello.vbs and pressing the Enter key After the script... scripts and recommended places to go to learn more The basic outline of the book is as follows: • Chapter 1, “Getting Started with theWSHand VBScript. ” This first chapter provides you with a high-level introduction to both theWSHandVBScript This includes how to install theWSHand how to create and execute your first VBScript In addition, this chapter includes a range of information about both the WSH. .. in which VBScript can run, theWSH is the most commonly used However, by learning to write VBScripts using the WSH, you are also learning much of the prerequisite knowledge required to write VBScripts that will run in each of these other environments TheWSH provides VBScripts with the capability to execute on Windows computers and to directly access and manipulate Windows resources such as the Windows . .487 xiv Microsoft WSH and VBScript Programming for the Absolute Beginner, Second Edition W elcome to the second edition of Microsoft WSH and VBScript Programming for the Absolute Beginner . VBScript. color-coding and line numbering. xvi Microsoft WSH and VBScript Programming for the Absolute Beginner, Second Edition How This Book Is Organized The second edition of Microsoft WSH and VBScript Programming. Buskus Proofreader: Jan Cocker To Alexander, William, Molly, and Mary. T he second edition of Microsoft WSH and VBScript Programming for the Absolute Beginner represents the culmination of efforts provided by a number