Tag:vbscript

  • Usage Summary of on Error statement in VBScript

    Time:2021-12-21

    If the on Error statement is not used, any runtime error is fatal; That is, the result will cause an error message to be displayed and the operation will be aborted. An “allowed” error handler is a handler opened by an on Error statement; An “active” error handler is an error handler that is allowed […]

  • Method of obtaining CPU utilization by VBScript

    Time:2021-12-20

    VBScript code to get CPU utilization through WMI In Du Niang, search the keyword “WMI CPU utilization”, and all you get are “Python using WMI monitoring system – CPU utilization”. Needless to see, it must be collected again. Python is powerful, but calling WMI is still “authentic” with VBS. ? 1 2 3 4 5 […]

  • Method of running 32-bit VBScript on Windows 64 bit operating system

    Time:2021-12-8

    Today, on the 2008 R2 64 bit server system, when running VBS files, the following prompts are given ? 1 2 3 4 5 6 7 8 9 ————————— Windows Script Host ————————— Script: C: \ users \ administrator \ desktop \ vbs_ cf.vbs that ‘s ok:   ten Character: 1 Error: provider not found. […]

  • VBScript outputs ESC according to the title of the IE window

    Time:2021-11-30

    It’s been a long time. A printer driver will always pop up a window and tell you what’s wrong. Because my program comes out automatically and belongs to a machine that has not been supervised for a long time, when this information jumps out, it will stop the program. At this time, you should think […]

  • VBScript Basics – VBS variable definition and usage

    Time:2021-11-26

    1、 Declarative variable ① Explicit declaration: declared with dim, public and private statements ② Implicit declaration: use directly without declaration ③ Mandatory declaration: the option explicit statement forces all variables to be explicitly declared ? 1 2 3 4 5 6 7 8 9 10 11 dim name,age name=”Ethon” age=27 msgbox name & age   […]

  • Basic part of VBScript – definition and use of VBS array

    Time:2021-11-25

    vbsarrayDefinition and Usage ArrayReturns a variable that contains an array.Note: the first element in the array is zero. grammar Array(arglist)parameter   describearglist   Required. A comma separated list of element values in the array. example Example 1 ? 1 2 3 dim a a=Array(5,10,15,20) document.write(a(3)) Output: 20 Example 2 ? 1 2 3 dim a […]

  • VBS Basics – VBScript process (using sub and function to define functions)

    Time:2021-11-19

    We usually use process functions when reusing some functions, such as cyclic output and paging Sub process A sub procedure is a set of procedures contained between a sub and an end sub statementVBSScript statement. If the sub procedure has no parameters, the sub statement must contain empty parentheses (). The example code is as […]

  • VBS foundation – definition and use of VBScript class

    Time:2021-11-18

    See a VBS from the InternetclassExamples, turn out and learn together! Class statement: declare aclassThe name of the class and the definitions of the variables, properties, and methods that make up the class. How to use VBS class Class structure:    Class name      end class    Call methodset myclass=new Class name   The code […]

  • VBS Basics – VBScript dictionary object

    Time:2021-11-17

    DictionaryIt stores data key and item pairsobjectIts main attributes are count, item and key, and its main methods are add, exists, items, keys, remove and removeAll.Create a dictionary object ? 1 2 3 ‘define and create a dictionary object, and use CreateObject to create and return a reference to the automation object Dim Dic Set […]

  • VBS foundation – VBScript dynamic array

    Time:2021-11-16

    Script file: b.vbs, includingDynamic arrayAdd elements, delete elements, traverse, count the number of elements, empty Example code ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 […]

  • VBS Basics – VBScript queue

    Time:2021-11-15

    Example code Script file: c.vbs, including adding elements (in line), deleting elements (out of line), traversal, counting the number of elements and emptying ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 […]

  • VBS Basics – VBScript stack

    Time:2021-11-14

    Example code Script file: d.vbs, including adding elements (pressing stack), deleting elements (out of stack), traversal, counting the number of elements and emptying ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 […]