With basic elements of OS X it is possible to designate a certain folder as input for the clipboard. When a file is saved into this folder a script reads its contents, saves it to the clipboard and deletes the file.
I assume the folder is called _SaveToClipboard
and is located at /Users/Flo/_SaveToClipboard/
. Please change the path accordingly.
- Create the folder
/Users/Flo/_SaveToClipboard/
- Create the script file
_SaveToClipboard.command
in/Users/Flo/_SaveToClipboard.command
- Make the script executable (manually via CMD+I or via Terminal:
chmod +x _SaveToClipboard.command
) - Create the launch configuration file
de.cdhq.apple.osx.SaveToClipboardLogger.plist
in/Users/Flo/Library/LaunchAgents/de.cdhq.apple.osx.SaveToClipboardLogger.plist
- Register the lauch configuration via Terminal command:
launchctl load /Users/Flo/Library/LaunchAgents/de.cdhq.apple.osx.SaveToClipboardLogger.plist
To uninstall simply unregister the launch configuration via launchctl unload /Users/Flo/Library/LaunchAgents/de.cdhq.apple.osx.SaveToClipboardLogger.plist
.