WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

How To
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Communicate with a third party applications windows-dialogs

 Keywords:  OLE Control Manager Send Key input read contents window

There are a few different ways Winbatch can communicate with a third party application ( windows / dialogs ):
  1. Sending key strokes

    One of the most useful and powerful features of WIL is the ability to send keystrokes to your programs, just as if you were typing them directly from the keyboard.

    SendKeysTo (parent-windowname, sendkey string)
    
    Activates the specified window and sends keystrokes to it. This is an ideal way to either input or gather information from a window.

  2. Using the Control Manager Extender

    The Control Manager Extender is a WIL extender DLL that allows near-complete access to all standard Windows controls displayed on the screen, and especially within Dialog Boxes presented by various applications.

    Control Manger Extender DLL Name: WWCTL44I.DLL

    Each function has a complete running example in the Control Manager help file, to show its usage. The basic technique is to open the application and get the dialog boxes you are interested in displayed on the screen.

    You can either:
    Run the RoboScripter to generate the code, via a wizard like interface.
    Or
    Run the Window Analysis script to create a text file detailing the contents of the window in question. Each window and control has its own unique window handle (often seen as hWnd or Wnd). Use the output of the Window Analysis script and the various cWndBy... functions in this extender to obtain the handle to the window or control you need, then use the specific functions designed for each type of control to either obtain information about the item, or to set it to the desired value.

  3. Using OLE

    The ability to control and assist the movement of data between applications is one of the key strengths of WIL. In early versions of WIL, the Clipboard and SendKey functions were the only way to transfer data. More recently, dynamic: data exchange (DDE) support allowed both the transfer of data to and the control of other applications.

    Now, with support for OLE Automation, you can do much more than share data. From within your WIL script, you can access and manipulate OLE objects that are supplied by other applications. With OLE Automation, you can use WIL to produce custom solutions that utilize data and features from applications that support OLE Automation.

    What Is OLE Automation?
    OLE Automation is an industry standard that applications use to expose their OLE objects to development tools, macro languages, and container applications that support OLE Automation. For example, a spreadsheet application may expose a worksheet, chart, cell, or range of cells -- all as different types of objects. A word processor might expose objects such as applications, paragraphs, sentences. bookmarks, or selections.

    When an application supports OLE Automation, the objects it exposes can be accessed by WIL. You use WIL scripts to manipulate these objects by invoking methods (subroutines) on the objects, or by getting and setting the objects' properties (values).

    You can manipulate other applications' OLE objects directly by first opening the object with the ObjectCreate function. The ObjectCreate function is used to open the object. See the section 'Object101, Ole 2.0, and Applications' in WIL help file for details.


Article ID:   W15161
File Created: 2013:06:25:08:07:14
Last Updated: 2013:06:25:08:07:14