VBScript Session 6 Dani Vainstein.

Slides:



Advertisements
Similar presentations
Objectives Understand the software development lifecycle Perform calculations Use decision structures Perform data validation Use logical operators Use.
Advertisements

Microsoft Visual Basic: Reloaded Chapter Six Repeating Program Instructions.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
String Variables Visual Basic for Applications 4.
COMP106 Assignment 2 - Direct Manipulation Library System - Proposal 9.
Input Validation Check the values entered into a text box before beginning any calculations Validation is a form of ‘self-protection’, rejecting bad data.
Input and Message Boxes. InputBox() Function An input box is a dialog box that opens and waits for the user to enter information. Syntax: InputBox(prompt[,title][,default])
5.05 Apply Looping Structures
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Automation Testing- QTP Rajesh Charles Batch No: Date: jan
Creating Embedded Formative Assessment Dr. Steve Broskoske Misericordia University EDU 533 Computer-based Education.
Dani Vainstein1 VBScript Session 9. Dani Vainstein2 What we learn last session? VBScript coding conventions. Code convention usage for constants, variables,
Saeed Ghanbartehrani Summer 2015 Lecture Notes #4: Working with Variables and User Interfaces IE 212: Computational Methods for Industrial Engineering.
Intrinsic Functions Pre-coded Functions Used to improve developer productivity Broad Range of Activities Math calculations Time/Date functions String.
Verify your data entry You could use data types and field properties for adding any validation on your date: EX: Data type: number : allow the user to.
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Six Repeating Program Instructions.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Copyright © 2008 Pearson Prentice Hall. All rights reserved. 1 Microsoft Office Excel Copyright © 2008 Pearson Prentice Hall. All rights reserved
Dani Vainstein & Monika Arora Gautam 1 Req0009 Implementation of Req0009.
1 ADVANCED MICROSOFT EXCEL Lesson 9 Applying Advanced Worksheets and Charts Options.
VBA Lab 2 I ns.Samia Al-blwi. Visual Basic Grammar Object: Visual Basic is an object-oriented language. This means that all the items in Excel are thought.
CHAPTER TWO Creating Simple Visual Basic.NET Windows Applications.
Dani Vainstein1 VBScript Session 1. Dani Vainstein2 Subjets for Session 1 Vbscript fundamentals. Variant subtypes. Variables. Option Explicit statement.
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Tutorial 51 Programming Structures Sequence - program instructions are processed, one after another, in the order in which they appear in the program Selection.
Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Six The Do Loop and List Boxes.
COMPUTER PROGRAMMING I 5.05 Apply Looping Structures.
OV Copyright © 2011 Element K Content LLC. All rights reserved.  Determine the Dialog Box Type  Capture User Input Creating an Interactive Worksheet.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
1 Scripting Languages VBScript - Recognized mainly by Internet Explorer only - Netscape does have a plug-in JavaScript - Recognized by Internet Explorer.
Tutorial 3: Using Variables and Constants1 Tutorial 3 Using Variables and Constants.
Chapter 4 Getting Started with VBA. Subroutines Subroutine is the logical section of code that performs a particular task. Subroutine is also called a.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 13 How Long Can This Go On?
Controlling Program Flow with Looping Structures
Visual Basic.net Functions. Function (Defined) A procedure that returns a value when called.
Visual Basic. The Close Method The Close method is used to close a form. To close a form use the keyword Me to refer to the form. Me.Close()
Creation of Variables with Numeric, alphanumeric, date, picture, memo data types Constant - A quantity that does not change during the execution of a program.
Looping Structures. A B dialog box that pops up and prompts the user for input Text area that pops up and prompts the user for to wait while it gets.
Dani Vainstein1 VBScript Session 5. Dani Vainstein2 What we learn last session? Branching Branching using If … Then … Else statement. Branching using.
CSC 162 Visual Basic I Programming. String Functions LTrim( string ) –Removes leading spaces from the left side of string RTrim( string ) –Removes trailing.
COMPUTER PROGRAMMING I 5.05 Apply Looping Structures.
Chapter 6 Controlling Program Flow with Looping Structures.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Dani Vainstein1 VBScript Session 8. Dani Vainstein2 What we learn last session? VBScript procedures. Sub procedures. Function Procedures. Getting data.
Subprocedures and Functions Visual Basic provides a number of facilities for creating modularized and reusable program code. The two you will learn about.
1 Displaying Dialog Boxes Kashef Mughal. 2 Midterm Stats Here we go  Average was  Low was 116  High was 184  Mid Quarter Grade - check any.
Automation Testing- QTP Rajesh Charles Batch No: Date: jan
Excel Tutorial 8 Developing an Excel Application
IS1500: Introduction to Web Development
Development Environment
VBScript Session 1 Dani Vainstein.
CHAPTER 10 JAVA SCRIPT.
Access VBA Programming for Beginners - Class 3 -
Topics Graphical User Interfaces Using the tkinter Module
Apply Procedures to Develop Message, Input, and Dialog Boxes
Predefined Dialog Boxes
VBScript Session 2 Dani Vainstein.
VBScript Session 4 Dani Vainstein.
WEB PROGRAMMING JavaScript.
Part A – Doing Your Own Input Validation with Simple VB Tools
VBScript Session 7 Dani Vainstein.
Messages and Input boxes
CIS 16 Application Development Programming with Visual Basic
Control Structures Part B - Message and Input Boxes
Additional Topics in VB.NET
VBScript Session 2 Dani Vainstein.
Introduction to RefWorks
Chapter 7: Input Validation
VBScript Session 1.
Quick Test Professional Training Part 1
Presentation transcript:

VBScript Session 6 Dani Vainstein

What we learn last session? Looping through code. Conditional looping. Linear looping. Collection looping. Forced exiting loops. Dani Vainstein

Subjects for session 6 The MsgBox function The InputBox function. VBScript Constants Dani Vainstein

An easy way to interact Showing an output Getting an input: MsgBox “Hello World!” Getting an input: Name = InputBox (“Who are you?”) Dani Vainstein

The MsgBox function Displays a message in a dialog box, waits for the user to click a button, and returns a value indicating which button the user clicked. MsgBox (prompt[, buttons][, title][, helpfile, context]) Dani Vainstein

The InputBox function Displays a prompt in a dialog box, waits for the user to input text or click a button, and returns the contents of the text box. InputBox (prompt[, title][, default] [, xpos] [, ypos][, helpfile, context]) Dani Vainstein

VBScript Constants A number of useful constants you can use in your code are built into VBScript. Constants provide a convenient way to use specific values without actually having to remember the value itself. Using constants also makes your code more maintainable should the value of any constant ever change. Because these constants are already defined in VBScript, you don't need to explicitly declare them in your code. Simply use them in place of the values they represent. Dani Vainstein

Constants MsgBox Constants Color Constants Date and Time Constants Defines constants used in the MsgBox function to describe button visibility, labeling, behavior, and return values Color Constants Defines eight basic colors that can be used in scripting RGB, CMYK. Date and Time Constants Defines date and time constants used by various date and time functions. Miscellaneous Constants Defines constants that don't conveniently fit into any other category. Dani Vainstein

Constants String Constants Tristate Constants VarType Constants Defines a variety of non-printable characters used in string manipulation. Tristate Constants Defines constants used with functions that format. VarType Constants Defines The various variant subtypes. Dani Vainstein

Excercise Dani Vainstein

Lab 6.1 Use the InputBox for retrieve a password, title login to EX 6.1. If the input is an empty string, exit the program. Declare a constant MY_PASSWORD. Declare a constant MAX_RETRY = 3. If the password is correct display a MsgBox with a wellcome message + information icon + EX 6.1 title. Display a message each time password incorrect + question icon and a question to retry or cancel the login process. If the password is typed wrong more then MAX_RETRY times, display an error message with an error icon, then exit the program. Use the Do..Loop (While or Until). Tip Use the Exit Loop statement. Check the value returned from MsgBox. Dani Vainstein

Make sure to visit us Tutorials Articles Projects And much more www.AdvancedQTP.com