tailieunhanh - Microsoft WSH and VBScript Programming for the Absolute Beginner Part 30

Microsoft WSH and VBScript Programming for the Absolute Beginner by Jerry Lee Ford Part 30. 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 ProcessRandomNumber DetermineIfSetIsComplete Loop BuildDisplayString ResetVariableDefaults Next DisplayFinalResults DisplaySplashScreen Procedure Section Function SetVariableDefaults blnAllNumbersPicked False blnlnputValidated False intNumberCount 0 intNoOfValidPicks 0 End Function Function ProcessScriptIniFile Establish default variable settings Dim FsoObject Sets up a reference to the FileSystemObject Dim OpenFile Sets up a reference to the script s .ini file Set FsoObject Dim intEquals Used to parse .ini file data Chapter 8 Storing and Retrieving Data 271 Dim strKeyName Dim strSourceFile Dim strInput Represents a key in the script s .ini file Specifies the name of the script s .ini file Represents a line in the script s .ini file strSourceFile Identify script s .ini file If strSourceFile Then Set OpenFile strSourceFile 1 Do Until Mid strInput 1 15 GameControls strInput Loop Do Until True strInput If Mid strInput 1 1 Then Exit do End If If Len strInput 0 Then intEquals Instr strInput strKeyName Mid strInput 1 intEquals - 1 Select Case strKeyName Case Greeting strTitleBarMsg Mid strInput intEquals 1 Len strInput Case DisplayFormat strDisplayType Mid strInput intEquals 1 Len strInput Case NoOfPicks intNoOfPicksToSelect Cint Mid strInput intEquals 1 _ Len strInput Case RangeOfNumbers intRangeOfNumbers Cint Mid strInput intEquals 1 _ Len strInput Microsoft WSH and VBScript Programming for the Absolute Beginner Second Edition End Select End If Loop Else MsgBox The .ini file is missing. Unable to execute. End If End Function Function CollectPlayerInput Ask player how many sets of s to create Do Until blnInputValidated True intNoOfPlays InputBox How many sets of numbers do _ you want .