Skip to content

Instantly share code, notes, and snippets.

@OnorioCatenacci
Created August 1, 2014 19:27
Show Gist options
  • Save OnorioCatenacci/da656caac26386237ba5 to your computer and use it in GitHub Desktop.
Save OnorioCatenacci/da656caac26386237ba5 to your computer and use it in GitHub Desktop.
How To Write Data To Windows Clipboard
defmodule WinClip do
def write_to_clipboard(string_to_write) do
p = Port.open({:spawn,"clip"},[:stderr_to_stdout, :stream, :binary, :exit_status])
Port.command(p,string_to_write)
Port.close(p)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment