Submitted by: Submitted by Latinlady84
Views: 200
Words: 583
Pages: 3
Category: Other Topics
Date Submitted: 08/04/2013 07:12 PM
Student Name | Lupe Valdez | Class | Comp230 | Date | 7/19/2013 |
VBScript IPO VBox Lab Report
' VBSScript: NameAge.vbs
' Written by: Lupe Valdez
' Date: July 19, 2013
' Class: Comp230
' Professor: Gasko
' Create name and age variables
name = ""
ageStr = ""
' Prompt User for Name and Age
WScript.StdOut.Write("Please Enter Your Full Name.......... ")
name = WScript.StdIn.ReadLine()
WScript.StdOut.WriteLine() 'Skip 1 Line
Wscript.StdOut.Write("Please Enter Your Age .............. ")
ageStr = Wscript.StdIn.ReadLine()
' Calculate Age+10 and assign to ageStr10
ageStr10 = Cstr( CInt(ageStr)+10 )
' Display Name and Age Values
WScript.StdOut.WriteBlankLines(2) 'Skip 2 Lines
Wscript.StdOut.WriteLine("Your Name is " & vbTab & vbTab & name)
WScript.StdOut.WriteLine("Your Age is " & vbTab & vbTab & ageStr)
WScript.StdOut.WriteLine(vbCrLf & "Your Age in 10 years is ...... " & _
ageStr10 & vbCrLf)
WScript.StdOut.WriteLine("End of Program")
Copy your NameAge.vbs program from NotePad++ and paste it into the space provided below:.
Capture the NameAge.vbs Run from the console window and copy it into the space provided below:
' VBSScript: NameAge.vbs
' Written by: Lupe Valdez
' Date: July 19, 2013
' Class: Comp230
' Professor: Gasko
' Create name and agw variables
name = "John Doe"
ageStr = "50"
' Calculate Age+10 and assign to ageStr10
ageStr10 = Cstr( CInt(ageStr)+10 )
' Build output as a single string msgStr
msgStr = "Your Name is " & vbTab & vbTab & name & _
vbCrLf & "Your Age is " & vbTab & vbTab & ageStr & _
vbCrLf & vbCrLf & "Your Age in 10 years is ...... " & _
ageStr10 & vbCrLf & vbCrLf & "End of Program"
'One Echo Statement for all output
WScript.Echo msgStr
Copy your PopUpWindow.vbs program from NotePad++ and paste it into the space provided below:
Capture the PopUpWindow.vbs Run (using...