VBScript - The features
On August 31,2023 by Tom RoutleyVBScript is a language that integrate with container applications, called as "Scripting hosts". Thus the container provides an execution environment and a number of objects with which the language can interact.
Moreover, it is possible to use objects other than the ones natively provided by the container: external objects know as ActiveX objects.
The following diagram summarizes this concept:
The operating system provides Windows Scripting Host (WSH) container, which in turns provide access to an object named WScript . The WScript object has a number of properties and methods for manipulating files on the system, network connections or printers.
. The WScript object has a number of properties and methods for manipulating files on the system, network connections or printers. Internet Explorer provides a container to manipulate the "document" object, representing the HTML page and all of its components (form elements, images, etc..).
Note that: VBScript programming depends heavily on the container in which it is executed.
Language typology
VBScript is not case sensitive, which means that you can either write your variable names in lowercase or uppercase. However, to ensure some consistency in your scripts, it is advisable to stick to a specific method. The structure of language allows one statement per line of code. Given that the instructions written in VBScript don't end with any specific character, in order for you to write a long statement on multiple lines, it is necessary to use a special character called a "line-continuation character". In VBScript it is a space followed by an underscore. By cons, to write multiple statements on a single line, it is necessary to use a colon (:) to separate instructions ...
It is possible to use comment in VBScript, that is to say the lines of text to document the script, which will not be interpreted by the ActiveX Scripting. To add comments, just use the comments symbol ('), and all characters that follow this symbol on the same line will not be interpreted.
Dim myVariable 'This is a comment 'This is a comment too
Original document published on CommentcaMarcheet
Article Recommendations
Latest articles
Popular Articles
Archives
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- January 2021
Leave a Reply