Introduction to VBScript

Introduction to VBScript

Introduction to VBScript, What is VBScript?, Scripting Languages vs. Programming Languages, and VBScript Programming Fundamentals. Introduction to VBScript 1. What is VBScript? 2. Scripting Languages versus Programming Languages 3. Usage of VBScript 4. VBScript Fundamentals and Features 1. What is VBScript? Visual Basic Script (VBScript) is a component-based scripting language developed by Microsoft. It is … Read more

VBScript Excel Object Model

VBScript Excel Object Model It is used to Perform Operations on Excel Application. Excel Application Excel File / Excel Workbook Excel Sheet / Excel Worksheet Create Excel Application Object Syntax: Set variable = CreateObject(“Class value”) example Set objExcel = CreateObject(“Excel.Application”) VBScript Excel Scripting Examples: 1) Create an Excel file Dim objExcel Set objExcel = CreateObject(“Excel.Application”) … Read more

VBScript FileSystemObject

VBScript FileSystemObject File System Operations i) What is Computer File System? It is a feature of Operating system used to work with Drives, Folders and Files. ii) Examples for File System Operations Create a Folder Copy a Folder Delete a Folder Create a Text file Delete a Text file Read data Write data Comparisons Search … Read more

VBScript Tutorial 7

VBScript Tutorial 7 (VBScript File System Operations Part-2) 6) Create a Text file Note: File System Object is only used for Drives, Folders and Flat files. We can create and delete other types of also, but we can’t perform internal operations like Reading, Writing etc… Dim objFso Set objFso = CreateObject(“Scripting.FileSystemObject”) objFso.CreateTextFile “C:\Users\gcreddy\Desktop\QTP.txt” objFso.CreateTextFile “C:\Users\gcreddy\Desktop\QTP.doc” … Read more

UFT Class 21

UFT Class 21 (VBScript Fundamentals and Features) 1) Comments To make the code readable To make the code disable from execution 2) Data Types VBScript supports implicit declaration of Data Types. In VBScript, only data type is Variant. Using VarType function we can check data sub-type Ex: Dim a a =”abcd” a = 123 a … Read more

UFT Class 20

UFT Class 20 (Overview on VBScript) I) Introducing VBScript Visual Basic Scripting Edition > VBScript was launched in 1997 > Vendor: Microsoft > VbScript derived from VB Programming language > VBScript not a case sensitive language Ex: Dim a A = 100 Msgbox a ‘100 > VBScript ignores extra spaces Ex: Dim a a = … Read more