Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 4.2



Issue: 4.2 (November/December 2005)
Author: Brian Rathbone
Article Description: No description available.
Article Length (in bytes): 3,935
Starting Page Number: 10
Article Number: 4206
Related Web Link(s):


Full text of article...

Automating Windows applications can be a difficult and tedious process, especially when the program you wish to automate doesn't have any built in scripting capabilities. The Win32 API contains functionality for inter-application communication, but determining an application's class structure and hierarchy can be a daunting task.

If you are armed with a copy of WinDowse, however, this process becomes almost trivial. Just click on the Dowse button and you are ready to explore. When you click on a window or control, WinDowse displays detailed information about the application, window, and class structure.

Once you have clicked on your target window, you can take a snapshot of the data. By default, you must use the keyboard to switch back to WinDowse and hit ALT+O to stop "Dowsing", but there is a very nice "click to stop" option available.

If, for example, I wanted to place some text into a running instance of Wordpad, I could use WinDowse to explore Wordpad. WinDowse helps me quickly determine that my version of Wordpad uses a RICHEDIT50W control, whose parent is type WordPadClass. Armed with this information, I can locate the control and set its text programmatically with a declare to the Win32 API SendMessage function.

WinDowse even includes a Modify tab, which allows me to manually change the values of some types of controls. This can be quite useful for testing your desired automation approach, and can also be fun for research and exploration. If you can modify a value from within WinDowse, then you can change that same value using REALbasic code.

WinDowse does not stop there, though. Information is available about the executable and the modules it uses. Many details and properties of the application window are displayed, including the styles applied to the window. The Tree tab allows you to browse all processes running on your system and their class structure.

A few functions provided by WinDowse seem a bit out of place, but they are unobtrusive and not unwelcome. The graphics tab provides the ability to take screen shots, show pixel color as RGB, zoom, and identify pixel positions. Coordinates are shown relative to screen, window, and client area.

WinDowse can't solve every automation problem. Some standard and non-standard controls, for example, do not expose their data, which can make WinDowse less effective. In these cases, WinDowse can still provide valuable information, even if that information only illustrates what is not possible.

Exploring your REALbasic developed applications with Windowse can be fun and educational. It can be enlightening to see the list of modules loaded by your application, and to identify the types of controls used by REALbasic.

Whether you need to populate an edit control or read the text of a statusbar, WinDowse can help light the way.

End of article.