GetClipboard
string GetClipboard()Description
Reads the current text content from the Windows clipboard and returns it as a string.
If the clipboard is empty or does not contain text data, an empty string is returned.
Parameter
- None
Return
- string - The text currently stored in the clipboard, or an empty string if no text is available.
Example
void main()
{
string text = GetClipboard(); // Read current clipboard content
Print(text);
VerifyEqual(text, "Expected Text"); // Verify the clipboard content
}