How to record a login macro and automatically run at startup

How to record a login macro and automatically run at startup

Running a simple script that logs into the host is a common request, which is easily accomplished following the steps below:

Record a Macro:

  1. Open the Flex Terminal Emulator workspace, which contains the session that you want to automatically login to.
  2. Make sure the session is connected to the host, otherwise select the Home ribbon tab and press the Connect button in the Communication tab group.
  3. From the Macro tab group, press the Record button to begin recording your keystrokes, mouse movements, etc.  Since everything is recorded until the Record button is pressed a second time, caution should be used during this step of the process.
  4. Login to the host as you would normally.
  5. Optionally, issue any commands necessary to reach your final destination.  For example, if you want to land on a particular menu option of the host application, record the necessary keystrokes.
  6. Once you are satisfied with the macro recording, press the Record button to end recording, which will prompt you for a name for the macro.
  7. Enter a new name in the File name field, or optionally select an existing macro to overwrite, then press the Save button.

Configure Session to Run the Macro at Startup:

  1. Logout of and disconnect from the host using the Connect button in the Communication tab group on the Home ribbon tab.
  2. Press the Setup button in the Communication tab group.
  3. Expand the Advanced section by pressing the arrow to the left.
  4. Press the ellipses button  to the right of the Start Up Action property.
  5. Select Macro from the Action Property page.
  6. Select the macro recorded earlier from the list and press OK twice.
  7. Choose the File>Save All menu command to ensure all settings are saved.
  8. Test by reconnecting the session using the Connect button in the Communication tab group.

Notes:

  • If the recorded macro does not work as expected, you may simply re-record, or manually edit to fix any obvious errors.
  • Text entered into password fields are recorded as encrypted text, which is then decrypted during playback.
  • To remove the startup macro from a session, simply set the Action Property to Nothing

    • Related Articles

    • How to assign a macro to a keystroke

      A user may wish to assign a macro that was previously recorded or written to a key combination on the Flex Terminal Emulator keyboard map. Follow the steps below to accomplish this: Open the Flex Terminal Emulator session (*.aha) to be modified. ...
    • How to export a host screen to Microsoft Word

      A macro can be used to "scrape" the data from the current Flex Terminal Emulator host screen and export to a Word document. The sample macro code below demonstrates this: Sample Code: Sub Main() ' Create the Word objects Set objWord = ...
    • How to export a host screen to a new Outlook email message

      A macro can be used to "scrape" the data from the current Flex Terminal Emulator host screen and export to a newly created Outlook email message. The sample macro code below demonstrates this: Sample Code: Sub Main() Dim outobj, mailobj ' Determine ...
    • How to export data from several host screens to cells in an Excel spreadsheet

      A macro can be used to "scrape" specific table data from the current Flex Terminal Emulator host screen, export to cells within a newly created Excel spreadsheet, then repeat this process to traverse multiple host screens. The sample macro code below ...
    • Keyboard gets locked when user types in a protected field

      By default, if a user inadvertently types in a protected area of the host screen, an input inhibited condition is caused and the keyboard is locked. This is indicated on the Operator Information Area (OIA), at the bottom of the Flex Terminal Emulator ...