Archive for the ‘Sample Code – Language Statements’ Category


Write HTML for Browser

‘========================================================= ‘ Name: WriteHTMLBrowser.vbs ‘ Author: Neal Walters ‘ http://VBScript-Training.com ‘========================================================= ‘ ‘ Show two ways to Read a file ‘ 1) use the ReadAll method to read all text in one “big gulp” ‘ 2) use the ReadLine method in a loop ‘ and loop until AtEndOfStream is true ‘ ‘ This program also [...]

Read More...

Getting Input (Prompt)

‘============================================================== ‘ NAME: GettingInput02.vbs ‘ AUTHOR: Neal Walters ‘ DATE : 2/15/2005 ‘ http://VBScript-Training.com ‘ ‘ COMMENT: ‘ ‘============================================================== buttons = vbOKOnly ‘ this is the default, has numeric value of 0 showmsg(buttons) ‘—— adding standard icons —————- buttons = vbInformation showmsg(buttons) buttons = vbExclamation showmsg(buttons) buttons = vbQuestion showmsg(buttons) buttons = vbCritical showmsg(buttons) ‘—— [...]

Read More...

Select Case Statement – Alternative to If/Then/Else

‘=============================================================== ‘ NAME: SelectCase.vbs ‘ AUTHOR: Neal Walters ‘ DATE : 2/13/2005 ‘ http://VBScript-Training.com ‘=============================================================== state = “fl” WScript.Echo ” The name of the state code=” & state & ” name=” & StateLookup(state) Function StateLookup(statecode) Select Case UCase(statecode) Case “NY” ‘WScript.Echo “State = New York” statename = “New York” Case “CA” ‘WScript.Echo “State = California” [...]

Read More...