Clipboard - Examples                             How to use?

 

Example 1: In the data transfer task use the 'Clear Clipboard' command before each iteration.

  1. Before the End Loop command insert a 'Clear Clipboard command.
  2. This command is useful when you are transferring data using Ctrl + C (copying) from one application and Ctrl + V (pasting) into another application; and when you are doing this operations within a loop. Some times there are empty data in the applications like Excel cells and it does not clear the copied data from the previous iteration.

Example 2: Assign the value of a variable to Clipboard so that the value can be directly pasted using Ctrl + V after the task is over.

  1. Open the Task Editor from Tools -> Task Editor.
  2. Double click on the 'Clipboard' command.
  3. Specify 'Assign To Clipboard' option.
  4. Select the variable from the drop down list whose value you want to assign to the Clipboard.
  5. Click on 'Save' button.
  6. At the end of the task if you want some data into the Clipboard, then you can use this command so that as soon as the task finishes you can simply use Ctrl + V to get the data pasted in the desired application for e.g. email client.

Example 3: Compare two cells of an Excel document by assigning the value of Clipboard to a variable.

  1. Open the Task Editor from Tools -> Task Editor.
  2. Double click on the 'Clipboard' command.
  3. Specify 'Assign From Clipboard' option.
  4. Select the variable 'Cell1' from the drop down list.
  5. You can assign values from Clipboard only to 'Value' type variables and not to 'List' or 'Random' types.
  6. Click on 'Save' button.
  7. Similarly assign the value of Clipboard (After performing Ctrl + C operation) to another variable 'Cell2'.
  8. Perform the comparison operations on variables Cell1 and Cell2 as per your need.