how to make multiple responses using vbs

November 3, 2009 at 17:23:18
Specs: Windows Vista
Ok so im trying figure out how to do multiple responses, and it is getting confusing and it wont work, so i figured id copy and past what i have, and you could tell me if i was completly wrong, I will make response saying what i was thinking

gabe = msgbox ("hello" ,36, "well you")

if gabe = vbyes then
luke = msgbox ("ohh alright" ,36, "i hope")
else if gabe = vbno then
josh = msgbox ("ohh retard" ,36, "its right")

if luke = vbyes then
tim = msgbox ("im right u loser" ,36, "lets move it")
if luke = vbno then
sam = msgbox ("im right your wrong" ,36, "get it done")

if josh = vbyes then
wendy = msgbox ("i always win" ,36, "you always lose")
if josh = vbno then
shilo = msgbox ("i once again win again" ,36, "i win forever")

End if


See More: how to make multiple responses using vbs

Report •


#1
November 3, 2009 at 17:29:42
ok so i was thinking i would use names instead of letters to make it easier to understand

from the first box (gabe options) i tried to put if you chose yes it would be luke, and if you chose no it would be josh

and then i put in the next box (Luke options) if you chose yes it would go to tim, and if you chose no it would go to sam

and then in the third box (josh options) if you chose yes it would be wendy ,and if you chose no it would go to shilo


when i paste it on notepad it keeps telling me i need end if added althou i already do
I'm fairly new with vbs and any help would be appreciated
was i completly wrong or am i just a little off Thanks


Report •

#2
November 3, 2009 at 19:58:25
Each of your If statements need ended using End If.

gabe = msgbox ("hello" ,36, "well you")

If gabe = vbyes then
luke = msgbox ("ohh alright" ,36, "i hope")
ElseIf gabe = vbno then
josh = msgbox ("ohh retard" ,36, "its right")
End If

If luke = vbyes then
tim = msgbox ("im right u loser" ,36, "lets move it")
ElseIf luke = vbno then
sam = msgbox ("im right your wrong" ,36, "get it done")
End If

If josh = vbyes then
wendy = msgbox ("i always win" ,36, "you always lose")
ElseIf josh = vbno then
shilo = msgbox ("i once again win again" ,36, "i win forever")
End If


But I guess if it were me, I would nest your If statements a little more like the following. Then if you nest things correctly you don't even need to have more then one variable, you can use the same one for everything.


Choice = msgbox ("hello" ,36, "well you")

If Choice = vbyes then 
  Choice = msgbox ("ohh alright" ,36, "i hope")
    If Choice = vbyes then
      Choice = "im right u loser"
    ElseIf Choice = vbno then
      Choice = "im right your wrong"
    End If
ElseIf Choice = vbno then
  Choice = msgbox ("ohh retard" ,36, "its right")
    If Choice = vbyes then
      Choice = "i always win, you always lose"
    ElseIf Choice = vbno then
      Choice = "i once again win again, i win forever"
    End If
End If

WScript.Echo Choice



Report •

#3
November 4, 2009 at 20:57:42
i tried righting the choice one on notepad and it wasnt working like i think i did everything right but it wouldnt work it kept wanting end and i wrote it exactly like u did above, do you just space twice?

Report •

Related Solutions

#4
November 5, 2009 at 18:20:43
omg i love stuffing things up my anus if anybody is interested in helping me out just give me a call.... im waiting in the bathroom with my pants down and my finger ready :) just let me know

Report •

#5
November 5, 2009 at 18:38:34
omg i love wieners so much.... they are my absolute favorite thing ever :) i just love how they feel when they enter my mouth and my butthole it feels sooooo good if there are any guys out there im lookin for ya :)

Report •

#6
November 5, 2009 at 19:26:04
gabe likes men and he loves big black wieners

Report •

#7
November 5, 2009 at 20:49:13
Yeah I was using double spaces, it helps me keep track of which if statements contain what, It's purely optional. the important thing is that the If statements are ended correctly. What happens if you just copy and paste it?

Report •


Ask Question