Sample Macro

Remote Desktop Connection Demo

Written by Kevin Heaton, Insight Software Solutions

What it does

This macro demonstrates how macros behave when running Macro Express over a Remote Desktop Connection.

If Macro Express is running on a computer via a Remote Desktop Connection, the macro continues to run when the Remote Desktop Connection is minimized or if you disconnect the Remote Desktop Connection. However, Windows stops recognizing keystrokes and mouse events making it appear that the macro is not running. But, if you send keystrokes and mouse events via Windows Controls, the macro will run properly.

The normal Window Controls limitations apply. That is, whether or not an application contains a Window Control depends on how the application was written. If an application does not contain any Window Controls, then a macro that sends information to a Windows Control will not work.

This simple macro demonstrates that the macro continues to run when the Remote Desktop Connection is disconnected or minimized. It does this by typing a line number into Notepad. If the line numbers are consecutive, it indicates that the macro continued to run properly and the application recognized the input coming from the macro. If the line numbers are not consecutive, it indicates that the macro continued to run but Windows did not send the keystrokes to the application.

To install

Download the macro file umremotedesktopconnectiondemo.mex and save it to your hard drive. Import the macro into your existing macro file by clicking File, Import, Import Macros.

To use

To run this macro, establish a Remote Desktop Connection and import this macro into Macro Express running on the Remote Desktop. Press Alt+R to activate it. You will be given a choice to use normal Text Type without a Window Control or a Text Type with a Window Control. Choose one and let the macro run.

While the macro is running, minimize the Remote Desktop Connection, wait for a few seconds, then maximize it. Observe whether or not the line numbers in Notepad are consecutive.

Run the macro again but make a different choice. Again, observe whether or not the line numbers are consecutive.

Requirements

A Remote Desktop Connection