Using the OS clipboard – read-clipboard

The following code temporarily stores some information to the clipboard:

write-clipboard "Some important info" ;== true; close Red console or Red programprint read-clipboard ;== Some important info

This can be used as a means of communication between two Red apps. The info stays on the clipboard until the OS restarts or until another program writes to the clipboard.

Get Learn Red - Fundamentals of Red now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.