Carlos-Sz Posted January 31, 2013 Share Posted January 31, 2013 Here is a simple workflow to create a text file with clipboard content in the current or top most Finder window/folder: 1. using a hotkey: the text is created with the following filename pattern: Clipboard - yyymmdd(hhmmss).txt 2. you can use newf key in Alfred (see screenshot) so you can write the first part of the file name (use CTRL key to remove the date and time from the filename). The default date and time was code this way in order to always generate an unique filename. Screenshot: http://d.pr/i/A2Kv Download: http://d.pr/f/5Jp7 This workflow is more a sample on how to use Shell/Bash and AppleScript together. Credits to phyllisstein and his workflow* and David Ferguson for helping. * http://www.alfredforum.com/topic/394-fixed-create-a-new-file-in-the-finder/ mjv 1 Link to comment
phyllisstein Posted January 31, 2013 Share Posted January 31, 2013 That's awesome! Should be very handy; great job. Link to comment
CarlosNZ Posted January 31, 2013 Share Posted January 31, 2013 Great stuff. Works really well. Make sure you upload it to the Alfred Repository so we can get auto-updates and the like. Link to comment
CarlosNZ Posted January 31, 2013 Share Posted January 31, 2013 One tiny suggestion — make the keyword argument "optional", and just give the file a generic name if the user doesn't specify one. Link to comment
Carlos-Sz Posted January 31, 2013 Author Share Posted January 31, 2013 That's awesome! Should be very handy; great job. Thank you. Great stuff. Works really well. Make sure you upload it to the Alfred Repository so we can get auto-updates and the like. Very interesting! Done. One tiny suggestion — make the keyword argument "optional", and just give the file a generic name if the user doesn't specify one. That’s a good idea. I’ll see if I can code it. Link to comment
oulipo Posted May 13, 2013 Share Posted May 13, 2013 Great workflow! Do you think it would be hard to autodetect whether the clipboard content is an image or a text to save it accordingly? Link to comment
Carlos-Sz Posted May 13, 2013 Author Share Posted May 13, 2013 Great workflow! Do you think it would be hard to autodetect whether the clipboard content is an image or a text to save it accordingly? Regarding text this workflow is better and you can also save in current Finder window. When you say image what exactly you mean? A peace of it from an image editor? Link to comment
oulipo Posted May 13, 2013 Share Posted May 13, 2013 Thanks for the updated link, I meant, I'd love to be able to quickly save an image that I have in the clipboard (typically, I just did a screenshot to the clipboard, and I now have to create a file for some reason) Link to comment
Carlos-Sz Posted May 14, 2013 Author Share Posted May 14, 2013 Thanks for the updated link, I meant, I'd love to be able to quickly save an image that I have in the clipboard (typically, I just did a screenshot to the clipboard, and I now have to create a file for some reason) FYI: In OSX you can use Command+Shift+4 to take a custom screenshot* and get a file saved in the Desktop automatically. *Hit space bar then mouse click a window to take its screenshot Link to comment
oulipo Posted May 14, 2013 Share Posted May 14, 2013 Yes, I know this (I actually use the Alfred2 screenshot workflow), the thing is: sometimes I took a clipboard screenshot, and I realize I have to send it to someone, so I have to open an image app & paste it, whereas as "Save clipboard as file" workflow would make it a snap (although I reckon this is something of a rarified occurence Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now