Thursday, October 15, 2020

What is vbscript -vbscript introduction

 


WHAT IS VBSCRIPT ?

what is vbscript

what is vbscript


            
               Welcome to the VBScripting environment. In that observe about sentence structure of VBScript, Enabling VBScript ,position of VBScript ,factors of VBScript ,constants,decisions,operator,loops,event,cookies,number,string,arrays,date,procedures,dialog boxes,object oriented,reg expressions,error handling,MISC articulations. 

                    VBScript, or its complete name, Microsoft Visual Basic Scripting Edition Language, is an improved adaptation of Visual Basic and Visual Basic for the Application Family of Programming Languages. It is likewise considered firmly identified with the Basic Programming Language. 

                VBScript is a scripting language. Or on the other hand more accurately a "scripting domain" that can improve and initiate HTML pages contrasted with standard web shows. Specifically, VBScript as a customer side scripting language for Microsoft Internet Explorer (adaptation 3.0 and later) by Microsoft, or as a server-side scripting language with Microsoft Internet Information Server (form 3.0 and later). Made to use in An essential bit of leeway to utilizing a server-side methodology is that VBScript is prepared by the server before it is transmitted by the customer. In this way, the customer gets just a single HTML page and we don't need to stress ourselves whether the program can decipher VBScript. On the other hand, utilizing a customer side methodology, you deliberately move the outstanding burden to the program to lessen the server's remaining task at hand. Lamentably, more established or non-Microsoft programs will most likely be unable to decipher and show the transmitted document accurately. Furthermore, the source code is presented to the program client. On the brilliant side, a customer side program can deliver an increasingly responsive application, as client info can be handled on the customer machine, and not sent back to the server for preparing. 

                    The genuine centrality of VBScript is that it is the default language of Active Server Pages (ASP). 

                  ASP is an energizing innovation from Microsoft that is essential to engineers. ASP broadens standard HTML by including worked in articles and server-side scripting and permitting access to databases and other server-side ActiveX segments. This implies now it is simpler than at any other time to make your site pages dynamic and alluring as you wish. 

                        VBScript can be a significant programming language. 

                    VBScript adaptation 5.0 was discharged in 1999. Unquestionably, the most significant new component of variant 5.0 is the capacity to utilize class explanations to make its own class object. Other new highlights of intrigue incorporate the TimEx work, with explanation, and RegExp and match objects utilizing ordinary articulations.

what is overvire of vbscript

 

VBScript - Overview

Overview Of Vbscripting,scripting
Overview Of VBScripting
               VBScript represents Visual Basic Scripting that forms a subset of Visual Basic for Applications (VBA). 

              VBA is a result of Microsoft which is incorporated NOT just in other Microsoft items, for example, MS Project and MS Office yet in addition in Third Party instruments, for example, AUTO CAD. 


    Features :


                    1.VBScript is a lightweight scripting language, which has an exceptionally quick mediator. 

                    2.Unlike C++ or Java, VBScript is an item based scripting language and NOT an Object-Oriented Programming language. 

                    3.VBScript, generally, is case obtuse. It has a basic language structure, simple to learn and to actualize. 

                    4.It utilization Component Object Model (COM) so as to get to the components of the earth where it is executing. 

                    5.Successful execution of VBScript can happen just on the off chance that it is executed in Host Environment, for example, Internet Explorer (IE), Internet Information Services (IIS) and Windows Scripting Host (WSH) 


    VBscript – Version History and Uses : 

               VBScript was presented by Microsoft path in 1996 and the principal variant was 1.0. The Current Stable rendition of VBScript is 5.8, which is accessible as a component of IE8 or Windows 7. 

               VBScript is utilized as a scripting language in one of the famous Automation testing devices – Quick Test Professional contracted as QTP 

               The VBScript use territories are galore and not limited to the beneath list. 

               Windows Scripting Host, which is utilized for the most part by Windows System overseers for robotizing the Windows Desktop. 

               Dynamic Server Pages (ASP), a server side scripting condition for making dynamic site pages which utilizes VBScript or JavaScript. 

               VBScript is utilized for Client side scripting in Microsoft Internet Explorer. 

               Microsoft Outlook Forms as a rule runs on VBScript; in any case, the application level programming depends on VBA (Outlook 2000 onwards). 


Disadvantage :


               VBscript is utilized uniquely by IE Browsers. Different programs, for example, Chrome, Firefox DONOT Support VBScript. Henceforth, JavaScript is favored over VBScript. 

               VBScript has a Limited order line support. 

               Since there is no improvement condition accessible as a matter of course, investigating is troublesome. 


Where VBScript is Today ? 

               The present rendition of VBScript is 5.8, and with the ongoing advancement of .NET system, Microsoft has chosen to offer future help of VBScript inside ASP.NET for web improvement.

               Henceforth, there won't be any increasingly new forms of VBScript motor yet the whole imperfection fixes and security issues are being tended to by the Microsoft supporting Engineering Team. 

               Nonetheless, VBScript motor would be dispatched as a feature of all Microsoft Windows and IIS of course.

what is VBScript - Syntax

 

VBScript - Syntax

Syntax Of VBScript
Syntax Of VBScript



    Your First VBScript is
        Let us write a VBScript to print out "Hello script kiddie".
<html>
    <body>
        <script language="vbscript" type="text/vbscript">
               document.write("Hello script kiddie!")
        </script>
    </body>
</html>


                In the above example, we called a function document.write, which writes a string into the HTML document. This function can be used to write text, HTML or both. So, above code will display following result:

Hello script kiddie!

  • Whitespace and Line Breaks :
                 VBScript ignores spaces, tabs and newlines that appear within VBScript programs.
                 Because one can use spaces, tabs and newlines freely within the program so you are free to format and indent your programs in a neat and consistent way that makes the code easy to read and understand.
  • Formatting :

                VBScript is based on Microsoft's Visual Basic. Unlike JavaScript, no statement terminators such as semicolon is used to terminate a particular statement.

  • Single Line Syntax :

                Colons are used when two or more lines of VBScript ought to be written in a single line. Hence, in VBScript, Colons act as a line separator.

<script language="vbscript" type="text/vbscript">
      var1 = 10 : var2 = 20
</script>

  • Multiple Line Syntax :
                When a statement in VBScript is lengthy and if user wishes to break it into multiple lines, then the user has to use underscore "_".
                 This improves the readability of the code. The following example illustrates how to work with multiple lines.


<script language="vbscript" type="text/vbscript">
  var1 = 10
  var2 = 20
  Sum = var1 + var2 
  document.write("The Sum of two numbers"&_
  "var1 and var2 is " & Sum)
</script>



  • Reserved Words :

                The following list shows the reserved words in VBscripting. These reserved words SHOULD NOT be used as a constant or variable or any other identifier names.

 Loop
 LSet
 Me
 Mod
ParamArray
 Or
 Next
 Preserve
 ReDim
 Not
 Nothing
 Null
 On
Currency
  New
 Optional
 Private
 Rem
 Resume
 RSet
 Select
 Set
 Shared
 Single
 Static
 Stop
 Then
 To 
 True
 Type
 And
 Boolean
 As
 ByRef
 Byte
 Call
 Case
 Class
 Const
Option
 Debug
 Dim
 Do
 Double
 Else
 End
 EndIf
 Enum
 Eqv
 Event
 Exit
 False
 Empty
 ElseIf
 False
 For
 Function
 Get
SendKeys
 Imp
If 
 Implements
 Integer
 Is
Let
 Like
 Long
 TypeOf 
 Until
Variant 
 Wend
 With
  GoTo
 Randomize
 Explicit
 Option 
 ExecuteGlobal
 Erase
 Msgbox
 Execute
Xor 
 Public
 RaiseEvent
 Sub
 ByVal
 Each
 False
 In
 While
 Eval
        
  • Case Sensitivity :

                VBScript is a case-insensitive language. This means that language keywords, variables, function names and any other identifiers need NOT be typed with a consistent capitalization of letters.
                So identifiers int_counter, INT_Counter and INT_COUNTER have the same meaning within VBScript.

  • Comments in VBScript :

                Comments are used to document the program logic and the user information with which other programmers can seamlessly work on the same code in future.
                It can include information such as developed by, modified by and it can also include incorporated logic. Comments are ignored by the interpreter while execution.


                Comments in VBScript are denoted by two methods.

1. Any statement that starts with a Single Quote (‘) is treated as comment. Following is the example:


<script language="vbscript" type="text/vbscript">
<!—
  ' This Script is invoked after successful login
  ' Written by : Script Kiddie
  ' Return Value : True / False
//- >
</script>