Functional Developer includes two example applications to demonstrate Automation and how to implement it in Dylan. The first application implements an Automation controller that sends commands to the second application, an Automation server.
You can find the controller application in the following folder under your Functional Developer installation:
Examples\ole\sample-automation-controller
The Automation server is in:
Examples\ole\sample-automation-server
The server is a simple drawing window that paints shapes upon command from the controller. A user can press buttons on the controller to make the server draw a circle or square, change the paint color, or clear its drawing window.
To use these applications, first open them from the Functional Developer IDE's Examples dialog, where you can find them under the "OLE" section.
Next build the applications with Project > Build.
Before you can run them, you need to register the Automation server with Windows so that the controller can connect to it. To register the server, at MS-DOS prompt go to
Examples\ole\sample-automation-server\build
and call
ms-dos> sample-automation-server.exe /RegServer
(See "Registering OLE/COM software" on page 125 for more details of registration.)
You should now be able to test the example.
sample-automation-server.exe application.
Figure 4.1 Sample Automation server at start-up.
sample-automation-controller.exe application.
build subfolder of the folder containing its sources.
Figure 4.2 Sample Automation controller.
Figure 4.3 Automation server after clicking Draw Circle in controller.
The command to draw a circle was sent via the COM connection from the controller to the server, which recognized and responded to it.