Insert Keystrokes - Examples                 How to use?

 

Example 1: To insert keystrokes in Microsoft Word document 'news.doc'

  1. Make sure that the Word document 'news.doc' is open.
  2. Open the Task Editor from New->Task Editor.
  3. Double click on the 'Insert Keystrokes' command.
  4. Select the title 'news.doc - Microsoft Word' from the drop down list.
  5. Insert the required keystrokes, e.g. Today's tasks are complete[ENTER].
  6. Click on 'Save' button.

Example 2: To copy a cell from an Excel document data.xls.

  1. Make sure that the excel document 'data.xls' is open.
  2. Open the Task Editor from New ->Task Editor.
  3. Double click on the 'Insert Keystrokes' command.
  4. Select the title 'Microsoft Excel -data.xls' from the drop down list.
  5. Insert keyboard shortcut Ctrl+C to copy. Click 'Ctrl Down' button, then type 'c' and then click 'Ctrl Up' button. [CTRL DOWN]c[CTRL UP].
  6. Click on 'Save' button.

Example 3: To insert keystrokes that will type in the current date and time. For e.g. name your files with current timestamp so that you can identify your files every time you run the task.

  1. Automation Anywhere provides various System variables that you can use to get the current date and time. They are $Date$, $Year$, $Month$, $Day$, $Hour$, $Minute$ and $Second$.
  2. You can configure the $Date$ variable to print the format you need. You can configure that from Tools->Variable Manager->System Variables->Date. Click on '...' button and select the format you need.
  3. Or you can also configure your own date and time format using the System variables $Year$, $Month$, $Day$, $Hour$, $Minute$, $Second$.
  4. Select the window from the drop down where you want to type in the date and time.
  5. Select the System variable from the 'Insert Variable' list and click on 'Insert' button. It will insert that variable in the text area.
  6. To name your excel file with current time stamp you can type something like MyExcelResults-$Year$-$Month$-$Day$-$Hour$-$Minute$- $Second$.xls

Example 4: To insert keystrokes in any window that is currently active.

  1. If you want to insert keystrokes into any window without specifying any window title, you can use this option.
  2. Open the Insert Keystrokes command.
  3. From the drop down list, select 'Currently Active Window'
  4. Specify your keystrokes.
  5. Save the command.