How to Copy Text to Clipboard from Automations
Below are the steps to copy information to the user's clipboard from an automation.
1) Add a Script component to the project's global container
2) Add the following to using / imports section
using System.Threading;
3) Add a new Script
Name:CopyTextToClipboard
Parameters: string text
Result type: void
Method body:
Thread thread = new Thread(() => System.Windows.Forms.Clipboard.SetText(text));
thread.SetApartmentState(ApartmentState.STA); //Set the thread to STA
thread.Start();
thread.Join();
***Updated by Moderator: Marissa to change from a Question post to a Discussion; added FAQ group tag***