Clipboard Object

The Clipboard object is used to manipulate text and graphics on the Clipboard. Use this object to copy, cut, and paste text in a script.

The object has the same methods as the Clipboard object available in Visual Basic:

  • Clear
  • GetData
  • GetFormat
  • GetText
  • SetData
  • SetText

For details on these methods, search Microsoft Visual Basic documentation for Clipboard object methods.

Example

The example is written in VBScript. To write similar code in Python, remove the word Set from the beginning, and use the print method instead of msgbox.

Copy code
Set cb = CreateObject("Mercury.Clipboard")
cb.Clear
cb.SetText "TEST"
    MsgBox cb.GetText