I was working on the command line, generating one log file after another. One of them turned out to be interesting, and I decided to forward it to a colleague.
The standard procedure now was:
- Open Finder,
- Look for the file,
- Copy that file,
- Paste the file in the instant messenger.
With a fresh idea from Tymek Makowski, I can now shorten that process to:
copy.scpt $_
, where$_
will contain the last file I worked with,- Paste the file in the instant messenger.
That is two steps shorter, which amounts to 50%!
copy.scpt
contents will be:
#!/usr/bin/env osascript
-- copy.scpt
-- Example:
-- $ ./copy.scpt file.png
-- You can now paste the file into a communicator, like Slack or WebEx.
on run (clp)
if clp's length is not 1 then error "Argument missing: file path"
set the clipboard to clp's item 1 as «class furl»
end run
Idea and base implementation: Tymek Makowski. Thanks!