How do I get the string obtained from get_clipboard function in godot?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Black Hole

So When I use the OS.get_clipboard() function in godot it stores the clipboard value as string.

Now I want to show that on the screen in some way, but I can’t.

txt1 = OS.get_clipboard does not work.

:bust_in_silhouette: Reply From: FuLeZi

This function works for me, make sure to use the parenthesis “()” such as:

var txt = OS.get_clipboard()
$HUD/TimeLabel.set_text("Clipboard: %s" % txt)

If it still does not works can you share us more code/information?