Skip to content

Clipboard

Using these methods it is possible to interact with clipboard content, clipboard methods can be useful when it is necessary to perform operations such as Ctrl+C and Ctrl+V.

Copy to Clipboard

You can copy text content to the clipboard.

# Copy to the clipboard.
bot.copy_to_clipboard("My text content")

# Performing a CTRL + V operation that will use the clipboard content.
bot.control_v()
// Copy to the clipboard.
copyToClipboard("My text content");

// Performing a CTRL + V operation that will use the clipboard content.
controlV();
// Copy to the clipboard.
await desktopBot.setClipboard('My text content')

// Performing a CTRL + V operation that will use the clipboard content.
await desktopBot.controlV()
// Copy to the clipboard.
await desktopBot.setClipboard('My text content')

// Performing a CTRL + V operation that will use the clipboard content.
await desktopBot.controlV()

Paste

You can use this method to use clipboard content or use specific text content.

# Using the paste method without parameters will have the same effect as using control_v.
bot.paste()

# You can also use this method already passing the text that will be used.
bot.paste("My text content")
// Using the paste method will have the same effect as using controlV.
paste("My text content");
// Using the paste method without parameters will have the same effect as using control_v.
await desktopBot.paste()

// You can also use this method already passing the text that will be used.
await desktopBot.paste('My text content')
// Using the paste method without parameters will have the same effect as using control_v.
await desktopBot.paste()

// You can also use this method already passing the text that will be used.
await desktopBot.paste('My text content')

Get Clipboard

In addition to setting the content, you can also get the current content from the clipboard.

# Performing a CTRL + C operation to get some content.
bot.control_c()

# Getting clipboard current content.
print(bot.get_clipboard())
// Performing a CTRL + C operation to get some content.
controlC();

// Getting clipboard current content.
System.out.println(getClipboard());
// Performing a CTRL + C operation to get some content.
await desktopBot.controlC()

// Getting clipboard current content.
console.log(await desktopBot.getClipboard())
// Performing a CTRL + C operation to get some content.
await desktopBot.controlC()

// Getting clipboard current content.
console.log(await desktopBot.getClipboard())