We have an automation script that displays booking details; the customer would like to copy the data from the booking details window.
As a workaround, we have replaced the label widgets in the automation script with the TextBox widget, which allows us to copy the data from it. However, we lost the formatting that we had with labels.
Keeping the labels would be the cleaner solution; can the data from the labels be copied somehow?
C# has a method to set the text on your clipboard, which is the equivalent of doing a copy. You could execute that code on the click of a copy button or on a certain hotkey press.
EDIT: My answer is invalidated by Wouter's comment as indeed scripts run on the server, so you can't copy to clipboard. The best course of action is probably to make a feature suggestion or use a textbox as you already are.
Ah true… There goes my plan.
Be aware that automation scripts run on the server, which does not have access to the clipboard of the client (Cube or LCA showing the automation script UI). No C# code is ever executed on the client.