Created
August 1, 2014 19:27
-
-
Save OnorioCatenacci/da656caac26386237ba5 to your computer and use it in GitHub Desktop.
How To Write Data To Windows Clipboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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