Change the clipboard data
Power Automate Desktop allows you to input keyboards as hardware, so you can reproduce operations like copy and paste performed by users, but you can operate the clipboard directly by using actions.
This time, I will explain how to directly rewrite the clipboard value.
Action to use
This time, we use an action called "Set Clipboard Text".
Details of "Set clipboard text" action
The action has the following parameters.
Parameter name | value |
---|---|
Clipboard text | Constitution string to set on the clipboard |
You can set the character string directly or set the value stored in the variable.
Please note that the clipboard is shared with the user operated, so if you copy some data to the clipboard before execution, it will be overwritten.
Implemented with copy and paste
This time, as a sample, we set a string on the clipboard and store the set string in the variable.
Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.
Clipboard.SetText Text: $'''changed from power automate desktop'''
Clipboard.GetText Text=> ClipboardText
Operate and implement Power Automate Desktop
Enter "Set Clipboard Text" from "Action Search".
Set the parameter as follows
Parameter name value Clipboard text changed from power automate desktop By execution, the value of the clipboard at the executed timing is overwritten.
Exceptions that can occur
It seems that an error may occur when Power Automate Desktop has set the contents of the clipboard.
We recommend that you implement block processing.