Finding Input and Output IDs

Every option (for example, File and Edit) in an emulator's menu has a unique Control ID number. Terminal Launcher uses these IDs to simulate the selection of options.

Terminal Launcher uses

To find these numbers, use Winspector, available at the Gipsysoft Web site, or Spy++, available from Microsoft's developer Web site.

This section explains how to use Winspector.


Setting Up Winspector

  1. Run the emulator. Don't close it.

    In this example, the emulator is Quick32.

  2. Run Winspector.


    Winspector's Welcome window
  3. Arrange the windows so that emulator window and Winspector window are both visible on the screen.

  4. Click and drag the Winspector icon to the title bar of the emulator, then release the mouse.


    Winspector's click-and-drag icon
  5. Verify that the title displayed on the emulator's title bar is listed among applications in Winspector's Click and Drag To Select a Window pane.


    Entries in the Click and Drag to Select a Window pane
  6. Right-click the emulator name, then click Messages.


    The Messages option

    With the Messages window open, Winspector is ready to capture and log messages.


    A new Messages window
  7. Limit what Winspector captures and logs.

    1. Right-click in the Messages window, then uncheck Show Return Values.


      The Show Return Values option
    2. Right-click in the Messages window, then click Edit Message Filter.


      The Edit Messages Filter option
    3. From the Edit Message Filter Window, click Filter All.


      The Filter All button

      When all messages are filtered, Winspector rejects all messages. The Messages window won't be cluttered with unwanted messages.


      All Message filters selected
    4. Scroll to and double-click WM_COMMAND, then click OK.


      The WM_COMMAND filter selected


Viewing Control ID Numbers

  1. (Conditional) From the emulator's Edit drop-down list, click Select All.

    If the emulator doesn't have a Select All option, skip this step.


    The Select All option from an Edit drop-down list
  2. In Winspector's Messages window, expand WM_COMMAND.


    An expanded WM_COMMAND message
  3. View the Control ID.

    Winspector uses the Code line to display the control ID. In this example, the control ID for Select All is 4104.

  4. Find the Control IDs for the Copy and Paste functions by repeating Step 1 through Step 3.

  5. Configure Terminal Launcher by adding the Control IDs.


Using Alternatives to Control ID Numbers

In the following situations, use an alternative to Control ID numbers:

The alternatives simulate keyboard shortcuts that achieve the same outcome. The keystrokes that you simulate depend on the keyboard shortcuts. The following tables lists the typical shortcuts:

Function Keyboard Shortcut

Copy

Ctrl+C

Paste

Ctrl+V

Select All

Ctrl+A

For example, if the Select All Control ID 64 and the Copy Control ID 50 don't work with Terminal Launcher, try any of the following alternatives in the Output IDs text box.


Alternative One

\Alt+E,S,\Alt+E,C

This output simulates the following:

Keys are not case sensitive.


Alternative Two

\Ctrl+a,\Ctrl+c

This output simulates the following:


Alternative Three

\Alt+e,\|40,\|40,\N,\Alt+e,\N

This output simulates the following:

All of these alternatives might or might not work with particular emulators. They will all need customizing to suit the emulator. You can adapt the alternatives to suit any requirement (for example, selecting other menu items).

Finding a Terminal Launcher configuration, including finding alternatives to the Control IDs, requires trial and error, which becomes easier with experience.

When you use alternatives, the increased number of steps slows the Terminal Launcher process slightly.