clipboard_has_text

Returns whether there is any text in the clipboard.

Syntax:

GML Code Example

clipboard_has_text();


Returns: Boolean


Description

This function will return true if the clipboard contains text or false if it does not.

NOTE: This function is only valid for the Windows target.


Example:

GML Code Example

if clipboard_has_text()
    {
    str = clipboard_get_text();
    clipboard_set_text("");
    }
 

The above code checks the clipboard for text and if it contains any, it is read as a string into the variable "str". Finally the clipboard is cleared by setting it to an empty string.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here