Hi,
I would like to add a button to my interactive script that, upon clicking, copies a provided value to the users' clipboard.
Is this possible with interactive scripts?
Kind regards,
Hi Thomas,
I quickly tested the RunClientProgram method, and it appears to work, at least on my setup with PowerShell V5.1 (DMA 10.5.8) installed on my computer. This is the code I used:
private void button_pressed(object sender, EventArgs e)
{
string text = $"Hello from IAS at {DateTime.Now.ToLongTimeString()}";
string command = $"Set-Clipboard -Value \\\"{text}\\\"";
engine.RunClientProgram("powershell.exe", command);
}
At execution time, it will ask you permissions to run locally.
Hi Gelber, thanks for the response. If I test this from Cube I am indeed getting the popup asking me for permission to execute it and the value is copied to my clipboard. However, when I test this from a Low-Code App, I'm not getting the popup and no value is copied to my clipboard.