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

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 33. 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,. | 300 Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition The Player wants to quit the game If strProcessGuess ExitFunction Then Exit Function End If The player typed invalid input If strProcessGuess SkipRest Then strProcessGuess SecondLevelValidation Select Case strProcessGuess Case DuplicateWrongAnswer MsgBox Invalid You ve already guessed this incorrect letter. Case DuplicateRightAnswer MsgBox Invalid You ve already guessed this correct letter. Case Else strCheckAnswer TestLetterGuess If strCheckAnswer IncorrectAnswer Then Reset the value of variable used to build a string containing the interim stage of the word as currently guessed by player strTempStringTwo NonGuessedString Check to see if the player has guessed the word blnGameStatus CheckIfGameWon If blnGameStatus True Then blnWordGuessed True Exit Do End If Set the value of the temporary string equal to the string created by the Previous loop strTempStringOne strTempStringTwo Clear out the value of the strDisplayString variable Chapter 9 Handling Script Errors strDisplayString FlipString End If End Select End If Loop DisplayGameResults End Function Building the RetrieveWord Function This function is designed to retrieve a randomly selected word to be used by the game. RetrieveWord first selects a random number between 1 and 10 and then uses that number to retrieve a game word from the WordList array. This function randomly retrieves a word from an array. Function RetrieveWord Randomize intRandomNo FormatNumber Int 10 Rnd RetrieveWord astrWordList intRandomNo End Function This is a good place to perform another test. This time open the temporary script that you created a little earlier and cut and paste it into the statements located in the previous function. Paste the three statements into the temporary file making them lines 3 though 5 in the script. Next add the following statement as line 6 MsgBox RetrieveWord Save and run the script. Each time you execute the .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.