The Clipboard Variable

AutoIt

The Clipboard Variable

The variable %CLIPBOARD% is special, and when used will be substituted for the text contents of the clipboard.  For example, if you copy the text "Hello!" to the clipboard and then run the following script:

MsgBox, 0, Example, The contents of the clipboard is: %clipboard%

The text "The contents of the clipboard is: Hello!" will be output to the screen.

Similarly, if you want to send text to the clipboard you can use the SetEnv command.  E.g. To put the text "I'm some pasted text" into the clipboard you can run:

SetEnv, clipboard, I'm some pasted text