mikeem em's Library tagged → View Popular
VBScript Select Case
-
Select Case statement only allows you to check if a variable is equal to a value - you can't test to see if it is greater than, less than etc. Also, you can only test against one variable. If you have multiple variables to test against, you'll need to use an If statement.
delete line site:http://www.microsoft.com/technet/scriptcenter/resources/qanda - Google Search
Hey, Scripting Guy! How Can I Search for Two Items in a Text File?
-
If InStr(strContents, "Windows 2000") Then
blnFound = True
End If
If InStr(strContents, "Windows XP") Then
blnFound = True
End If
Hey, Scripting Guy! How Can I Search for a Word in a Text File and Return the Entire Line Where That Word Was Found?
-
Close method and never touch Test.txt again. Why not? Because we don’t need it anymore; instead, we’ll conduct all our searches on the virtual copy of Test.txt stored in the variable strTargetText.
Hey, Scripting Guy! How Can I Increment the Last Line in a Text File?
-
replace the existing contents of Test.txt with a brand-new file. That new file will include the first x lines (unchanged) in Test.txt plus a new, modified last line.
-
FileSystemObject doesn’t allow us to change a single line in a text file;
Hey, Scripting Guy! How Can I Find and Replace Text in a Text File?
-
use the ReadAll method to read the contents of the entire file into the variable strText.
Quick Test Professional(QTP): VB Script and QTP - Part1
-
- Dim Statement
- Public Statement
- Private Statement
Variables
A variable is a placeholder that refers to a memory location that stores program information that may change at run time. A variable is referred to by its name for accessing the value stored or to modify its value.
Variable Declaration
Variables in VBScript can be declared in three ways:
For example:
Dim No_PassengerMultiple variables can be declared by separating each variable name with a comma. For example:
Dim Top, Left, Bottom, Right -
Note:
Variables declared with Dim at the script level are available to all procedures within the script. At the procedure level, variables are available only within the procedure.
Public statement variables are available to all procedures in all scripts.
Private statement variables are available only to the script in which they are declared.
- 3 more annotations...
Selected Tags
Related Tags
Sponsored Links
Top Contributors
Groups interested in vbscript
-
Quick Test Professional
"Quick Test Professional" -...
Items: 15 | Visits: 1
Created by: qualitypoint Tech
Highlighter, Sticky notes, Tagging, Groups and Network: integrated suite dramatically boosting research productivity. Learn more »
Join Diigo
