Page 1 of 1

Get ClipboardText over recorded shortcut cmd+C

Posted: Thu Nov 22, 2007 9:24 am
by urbach1907
Hi folks,

In a tested application I want store a marked text with a shortcut to the clipboard. When I try to get this back in .NET via Clipboard.GetText(); it didn't give back the copied string.

Regards,
Frank

Posted: Thu Nov 22, 2007 12:38 pm
by Support Team
I just tried to copy a portion of text from the Windows Notepad by sending the key combination "Ctrl + C":

Code: Select all

Application.SendKeys("{CTRLDOWN}c{CTRLUP}{CTRLDOWN}v{CTRLUP}");
string clipboardText= System.Windows.Forms.Clipboard.GetText();
That worked for me.

Can you please provide us your test code, perhaps we can reproduce the error that way.

Regards,

Alex
Ranorex Support Team

Posted: Sat Nov 24, 2007 6:48 pm
by urbach1907
Thanks for your reply. I had some trouble with the right shortcut for marking the text. I solved this and now it works.
Cool tool!

Frank