![]() ![]() I will continue" Sapi.speak "Nick always plays games but never opens anything else" Sapi.speak "Sorry for compaining, but I can't talk to anyone so I am depressed" Sapi.speak "and sometimes I have some erererererererrorsss" Sapi.speak "Am I relly a good friend?" variable4=MsgBox("Am I relly a good friand?",4+64,"Computer") if variable4 = vbNo then Sap.speak "So we are not friends" if variable5 = vbNo then Sapi.speak "ok I will stop talking" else Sapi.speak "ok so we are" else Sapi.speak "ok so we are. do you want to continue talking to me?" variable=MsgBox("Do you?",4+64,"Computer") if variable = vbYes then Sapi.speak "Ok then. Set Sapi = Wscript.CreateObject("SAPI.SpVoice") dim variable dim variable2 dim variable3 dim variable4 dim variable5 Sapi.speak "hello user. ![]() Note that 'userinput' and 'password' are variable holding text strings not text strings themselves. ![]() This program will say if 200 is equal to, greater than or less than 16. Can you do more? Yes! That is called a nested IF statement. ![]() So now you can make a program that will do one of two things. So now you see IF 200 > 16 THEN let the user know ELSE tell the user it isn't then END the IF statement. That was a foolish example (since 200 will always be greater than 16) of how the if statement works. The decision making command is called the IF THEN ELSE statement. What if you needed the program to check if a variable was at a certain value? In programming that is extremely easy. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |