background preloader


Facebook Twitter


Vba - detect event on IE from visio. Not really very easy unless you have access to the HTML content in IE as well, but you could use a VBA class which implements a "withevents" private variable to capture a reference to a particular element on the page, and which has an event handler to respond to browser-based events.

vba - detect event on IE from visio

Eg. in a class "clsHTML": Private WithEvents el As MSHTML.HTMLInputElement Public Sub SetElement(t As MSHTML.HTMLInputElement) Set el = t End Sub Private Function el_onchange() As Boolean Debug.Print "captured change: value = " & el.Value End Function In other code, create an instance of the class and call "SetElement" using a reference to an element on the page in IE: Dim objHTML As clsHTML 'global variable Sub TestEvents() Dim IE As Object 'set up your IE reference.... Set objHTML = New clsHTML objHTML.SetElement IE.document.getElementById("tester2") Debug.Print "set capture"End Sub.

Vbscript MessageBox

A VBScript Utility To Add Users To a Group. Scripting Active Directory Users using VBScript. Monitor servers, workstations, devices and applications in your network.

Scripting Active Directory Users using VBScript

Ways to Launch your application. Print Server Scripting using VBScript. Monitor servers, workstations, devices and applications in your network Changing Print Job Start Time Uses ADSI to change the start time for all print jobs larger than 400K to 2 AM.

Print Server Scripting using VBScript

Set objPrinter = GetObject(" For each objPrintQueue in objPrinter.PrintJobs If objPrintQueue.Size > 400000 Then objPrintQueue.Put "StartTime" , TimeValue("2:00:00 AM") objPrintQueue.SetInfo End If Next Changing Print Job Priority Uses ADSI to change the priority of current print jobs based on the size of those print jobs. VBScript Functions. Administrative RoutinesAdministrative Routines to help manage data Browser Function Returns the http_user_agent server variable IsCookieReady Function Determines if the current browser allows cookies IsFrameReady Function Determines if the current browser is able to displayed framed pages IsJSReady Function Determines if the current browser is able to run client-side javascript IsVBSReady Function Determines if the current browser is able to run client-side VBScript MkArchive Function Creates a zip archive of a specified files on the server RegDelete Statement Deletes Keys and Values from the Windows Registry RegRead Function Reads Keys and Values contained in the Windows Registry RegWrite Statement Writes Keys and Values into the Windows Registry SessInfo Function Returns a two-dimmensional array containing session variable names and their corresponding values Shell Statement Executes a DOS command on the server Spider Object Parses and saves HTML Meta Tag, head and or body data.

VBScript Tools by Bill James. VBScript (Visual Basic Scripting) is a handy tool for File, Drive and Registry maintenance in Win9x. All you need to run most .vbs files is WSH (Windows Script Host), which is included with Win98 and WinME, and can be added to Win95 by means of a free download from Microsoft (Internet Explorer 4+ required.) Some of these scripts will also work with WinNT and Win2K, but are not completely tested for those OS's. Windows Script 5.6 has now been released and has many useful new additional features.

Some of the scripts on this page will not work with older versions of WSH. Sendkeys. Send one or more keystrokes to the active window as if they were typed at the keyboard.


This method is similar to the VB SendKeys method. Most keys can be represented by the character of the key itself. E.g, the key sequence FRED can be represented simply by "FRED". Some special keys, such as the control keys, function keys etc are encoded in a string enclosed by {braces} See the table below To specify keys combined with any combination of SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following: Downloads. VBScript .Run. Run an external Command.

VBScript .Run

Syntax objShell.Run (strCommand, [intWindowStyle], [bWaitOnReturn]) Key objShell : A WScript.Shell object strCommand : The Command to be executed intWindowStyle (Optional) : Int value indicating the appearance of the program's window. Not all programs make use of this. bWaitOnReturn : Wait for the command to complete before continuing execution of the wsh script. If bWaitOnReturn is set to TRUE, the Run method returns any error code returned by the application. If bWaitOnReturn is not specified or FALSE, this method immediately returns to script execution rather than waiting on the process termination (and returns an error code of 0) Specifying the bWaitOnReturn parameter allows you to run programs synchronously (one at a time).

Environment variables within the argument strCommand are automatically expanded. VBScript in a nutshell. Logon Script Printer - AddWindowsPrinterConnection VBScript Method. I designed this page as a mini site map for printer logon scripts.

Logon Script Printer - AddWindowsPrinterConnection VBScript Method

In this section I will help you create VBScripts, which map printers and also set the default printer on Windows networks. You may be surprised by the sheer variety of Windows logon scripts that control printing. Along the journey, I will provide examples of VBScript methods. How to Multi-Thread VBScript Scripts. Executive Summary: Once you learn the basics of VBScript, you can accomplish almost anything you want with ease.

How to Multi-Thread VBScript Scripts

Armed with a browser and an Internet connection, you can find someone who has written code that collects the information you need or that sets the setting that you need to configure. The real trick is figuring out how to put all the disparate parts together into a cohesive whole while circumventing some of VBScript's limitations. For example, you can find scores of Web sites that provide code that determines how much free space is on a computer. DiskSpace.vbs in Listing 1 shows a script that does just that. It doesn’t even take much effort to combine these code snippets and create a script that determines the amount of free disk space on all servers in a domain, as DiskSpaceAllServers.vbs in Listing 3 shows.

One solution is to break your list of servers into smaller lists and execute the script against each smaller list. Working with operators in VBScript. Flex/ActionScript/C++/Scratch/Alice/C#/Java/JavaScript/XML Programming, by...