write a vbscript for traffic signal



write a vbscript for traffic signal..

Answer / manjunathareddy

Dim Red
Dim Green
Dim Orange
Dim Traffic
Traffic=InputBox("1.Red"&Vbnewline&"2.Green"&vbnewline&"3.Orange","Traffic
Signal")
Select Case Traffic
Case 1
Msgbox "Stop"
Case 2
Msgbox "Move"
Case 3
Msgbox "Ready to Move"
Case Else
Msgbox "Invalid Selection"
End Select

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More VB Script Interview Questions

1. How do declare public variable in vb scripts?

0 Answers  


generic function for webedit box for web application

1 Answers  


Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.

0 Answers   CSC,


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

0 Answers   iFlex,


i need to login to my yahoo accoutnt using VB Script, automating the operation of webobjects, even launching of IE. How?

1 Answers   Mphasis,






Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

0 Answers  


HOW TO OPEN NEW TAB USING VB SCRIPT IN QTP?

1 Answers   TCS,


Which loop is used in case of arrays in the vbscript language?

0 Answers  


How to get 120 using 5 zeroes, you can use any operator(+, *, /...) in qtp.

2 Answers   Cognizant,


How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.

0 Answers   College School Exams Tests,


What is the difference between for loop and while loop?

0 Answers  


When does ‘on click of button’ event gets triggered in the vbscript language?

0 Answers  


Categories