TAILIEUCHUNG - Microsoft WSH and VBScript Programming for the Absolute Beginner Part 6

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 6. If you are new to programming with Microsoft WSH and VBScript and are looking for a solid introduction, this is the book for you. Developed by computer science professors, books in the for the absolute beginner series teach the principles of programming through simple game creation. You will acquire the skills that you need for more practical WSH and VBScript programming applications and will learn how these skills can be put to use in real-world scenarios. Best of all, by the time you finish this book,. | Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition Let s break this statement down into pieces and see how it works. First of all the statement executes a built-in VBScript function called InputBox . This function displays a pop-up dialog box with a text entry field that allows the script to collect text input from the player. The VBScript InputBox function is just one of a number of options for collecting input. The InputBox function facilitates direct interaction with users. When direct user interaction is not required you can also develop VBScripts that can read input from text files or the Windows Registry. I ll show you how to read data from text files in Chapter 8 Storing and Retrieving Data and how to interact with the Windows Registry in Chapter 10 Using the Windows Registry to Configure Script Settings. You can also create VBScripts that process data passed to them at run-time. I ll show you how this works in Chapter 4 Constants Variables and Arrays. To communicate with the player the InputBox function allows you to display a message. In the case of this example the message is simply Knock Knock but could just as easily be Hello what is your name or any other question that helps the player understand the type of information the script is trying to collect. Finally the text typed by the player in the pop-up dialog box s text field is temporarily assigned to a variable called Replyl. Variables provide scripts with the capability to store and later reference data used by the script. Functions and variables are fundamental components of VBScript. Unfortunately it is difficult to write even the simplest scripts without using them. For now don t worry too much about them and keep your focus on the overall steps used to create and run the Knock Knock game. I ll go over the use of variables in great detail in Chapter 4 Constants Variables and Arrays and the use of functions in Chapter 7 Using Procedures to Organize Scripts. Validating

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.