Download

get text from windows clipboard?

Hi,
Is there any way that I can get the text that I’ve copied to clipboard into the game? I’d like to place the copied text from the clipboard in a string variable.

Thanks.

UMG’s TextBox can handle it during run-time, it has an OnTextCommitted event which you use to store your text.

Could you explain a bit.

What I’m wanting is, say I’m working in notepad.exe and I use Ctrl+C, so the text I’ve copied to clipboard while I’m windows explorer. Then I would like to get that text pasted into a variable. Do I just use OnTextCommitted event?

I assumed you need to do it *while *the game is running, is that right? OnTextCommitted should work.
Create a text variable in your widget and have the event set it:

Looks like there is also clipboarCopy and clipboardPaste here:
https://docs.unrealengine.com/en-US/API/Runtime/ApplicationCore/GenericPlatform/FGenericPlatformApplicationMisc/index.html