Skip to content

06 Writing to the clipboard

Vladyslav Pekker edited this page Dec 26, 2015 · 5 revisions

⬅️ | ➡️

In the ClipboardModule spells defines the object Clipboard, which defines the methods readString: Try[String] and writeString(content: String): Try[Unit] respectively:

scala> Clipboard.writeString("Hello World!")
res0: scala.util.Try[Unit] = Success(())

scala> Clipboard.readString
res1: scala.util.Try[String] = Success(Hello World!)

⬅️ | ➡️

Clone this wiki locally