FroZen_X Posted March 31, 2016 Share Posted March 31, 2016 (edited) I'm reproducing atm the Problem as this also occurs in deanishe's version. The bash has a fault in it. i=1 has to be $i=1 if im right and then the $i++ somehow has a syntax error which im checking on atm Edit: the i=1 is right lol silly me....you have to change the $i++ to i++ there is the mistake. Its for numbering the different screenshots. Edited March 31, 2016 by FroZen_X deanishe 1 Link to comment
FroZen_X Posted March 31, 2016 Share Posted March 31, 2016 Try this one, should work again: https://dropfile.to/YlSoo Link to comment
bongobong Posted March 31, 2016 Author Share Posted March 31, 2016 Ahhhh so why was it working and then not working? Link to comment
FroZen_X Posted March 31, 2016 Share Posted March 31, 2016 (edited) Forgot to add your old folders here the version with the folders added: https://dropfile.to/3Zvu5 The counter was wrong and somehow the version checking was giving another fault out, but the counter was the main problem. Like it could make a screenshot and a screenshot 1 but never 2,3,4 etc. Idk why it didn't just overwrite them as i thought it would. Could be that it doesnt have the rights no clue Edited March 31, 2016 by FroZen_X Link to comment
bongobong Posted March 31, 2016 Author Share Posted March 31, 2016 Hooray. It's working. thanks so much for all your help. This forum (and you two) are great! Link to comment
FroZen_X Posted March 31, 2016 Share Posted March 31, 2016 You're welcome hope this fixed all, if anything else is then just let us know. Link to comment
deanishe Posted March 31, 2016 Share Posted March 31, 2016 Forgot to add your old folders here the version with the folders added: https://dropfile.to/3Zvu5 The counter was wrong and somehow the version checking was giving another fault out, but the counter was the main problem. Like it could make a screenshot and a screenshot 1 but never 2,3,4 etc. Idk why it didn't just overwrite them as i thought it would. Could be that it doesnt have the rights no clue Yup. I messed up the incrementing of $i. I only ever tested it with 2 images (Screenshot.png and Screenshot 1.png), so I didn't notice that. Good work FroZen. The version thing isn't an error. That's why it says WARNING, not ERROR It's just the library complaining 'cos a couple of its features (updates and noticing when a workflow has been upgraded) depend on there being a version number. It doesn't matter in the slightest for this workflow because it doesn't store any data that may need migrating after an upgrade, and it doesn't have a GitHub repository it can update itself from. FroZen_X 1 Link to comment
nickwild Posted April 2, 2016 Share Posted April 2, 2016 This looks an ideal workflow, but your link has expired FroZen. Could you upload again please? Many thanks Nick Link to comment
bongobong Posted April 2, 2016 Author Share Posted April 2, 2016 It's brilliant isn't it. I'm inspired. What's the best way to learn a bit more about coding in Alfred? I want to be prepared for Alfred 3. Link to comment
FroZen_X Posted April 2, 2016 Share Posted April 2, 2016 (edited) This looks an ideal workflow, but your link has expired FroZen. Could you upload again please? Many thanks Nick Sure, here is the Workflow: https://www.dropbox.com/s/mzo0525tj8w0y2b/Take%20and%20Move%20Screenshots.alfredworkflow?dl=0 To change the shown folders where you can save the screenshots you have to go to the Workflow folder and open "folders.py". There you can change this part to what you desire: FOLDERS = [ '~/Downloads/Images/', '~/Downloads/Images/Unsorted', '~/Downloads/Images/Apple', '~/Downloads/Images/Beatles', '~/Downloads/Images/Beautiful', '~/Downloads/Images/Blur', '~/Downloads/Images/Cartoons', '~/Downloads/Images/Comments', '~/Downloads/Images/Creepy', '~/Downloads/Images/Delete in three days', '~/Downloads/Images/Design', '~/Downloads/Images/Follow Up', '~/Downloads/Images/Funny', '~/Downloads/Images/I did this', '~/Downloads/Images/Interesting', '~/Downloads/Images/Luminaries', '~/Downloads/Images/Material', '~/Downloads/Images/Movies', '~/Downloads/Images/Nostalgia', '~/Downloads/Images/Products', '~/Downloads/Images/Quotations', '~/Downloads/Images/Random', '~/Downloads/Images/Veitch', '~/Downloads/Images/Words', '~/Downloads/Images/YoShirt', ] It's brilliant isn't it. I'm inspired. What's the best way to learn a bit more about coding in Alfred? I want to be prepared for Alfred 3. You'll be able to do more in Alfred v3 without having to script anything. Other than that you can do a lot by looking at tutorials from deanishe like here: http://www.deanishe.net/alfred-workflow/tutorial_1.html#adding-a-script-filter Knowing a programming language before you want to code anything in Alfred is a huge plus. Like i don't know much of Python scripting but i know C, C++, C# etc. which helps a lot to understand whats going on. Together with a little piece of code and the help of Sir Google you can quickly make something your own. If you have then any other Problems then you can always ask here Edited April 2, 2016 by FroZen_X Link to comment
deanishe Posted April 2, 2016 Share Posted April 2, 2016 I'd also recommend having a look at Python (strangely enough). It's an excellent first language, and can be used for just about anything.This is an awesome Python tutorial/book.Thing is, the Python situation is a bit a funny right now. The above book (and Alfred-Workflow and its tutorial) are targeted at Python 2, because that's what's installed on OS X.But Python 3 is the version of the future, so learning Python 2 now would be a strange thing to do.They're not really that different, but most programs won't run on both unchanged or without extra effort.Here's the version of the above tutorial/book for Python 3.I honestly don't know which version to recommend. There's also Ruby, which is very similar in terms of what it can do. It's arguably more elegant that Python, and terser. I'm not a big fan personally, however, because Ruby makes it a bit too easy to write unreadable code. It always made me feel so stupid not being able to understand my own code Link to comment
nickwild Posted April 4, 2016 Share Posted April 4, 2016 Thanks FroZen and thanks (again) Dean. Now a good little coding project for me when I get time would be to save each screenshot with the name of the window it grabbed (or main screen) like Tiny. Link to comment
bongobong Posted April 11, 2016 Author Share Posted April 11, 2016 Wow. Do we have an ETA on Alfred 3? I can't wait to get cracking. Meanwhile, I also frequently drag and drop pictures; how might I adapt the script to copy an image from a browser or email into one of the selected folders by either right clicking or dropping into a folder on my desktop? Link to comment
FroZen_X Posted April 11, 2016 Share Posted April 11, 2016 Wow. Do we have an ETA on Alfred 3? I can't wait to get cracking. Andrew were saying something to this on twitter here: https://twitter.com/preppeller/status/719092785517830144 Should get something by the end of this month, which you can also see here: https://www.alfredapp.com/blog/ Link to comment
FroZen_X Posted April 11, 2016 Share Posted April 11, 2016 (edited) Meanwhile, I also frequently drag and drop pictures; how might I adapt the script to copy an image from a browser or email into one of the selected folders by either right clicking or dropping into a folder on my desktop? I use hazel to organize files that get saved in my downloads folder, desktop etc. There is no easy way of what i know tho. In Alfred 3 i know that the clipboard will have images too, so lets see what that will bring. Keep in mind that you can also search with Alfred for files and then drag and drop out of Alfred. You don't have to extra open finder. Edited April 11, 2016 by FroZen_X Link to comment
bongobong Posted April 11, 2016 Author Share Posted April 11, 2016 Hmmm. That's interesting. I use Hazel for organisation but there's no way I can give rules as it depends on what I think at the time about the picture I'm saving. Hazel won't pop something up saying "what shall I do with this" that I know of. Link to comment
deanishe Posted April 11, 2016 Share Posted April 11, 2016 (edited) Hmmm. That's interesting. I use Hazel for organisation but there's no way I can give rules as it depends on what I think at the time about the picture I'm saving. Hazel won't pop something up saying "what shall I do with this" that I know of. There's no software that can read your mind, alas. You can drag the image into the proper folder in the first place. You can tag the image and have Hazel do different things depending on the tags. You can write a simple AppleScript (or Python program) that does indeed pop up a dialog box asking you what to do with the image, and have Hazel run that for you. AppleScript dialogs are simple enough. Pashua and cocoaDialog are available if you're not insane and therefore do not want to use AppleScript. Edited April 11, 2016 by deanishe FroZen_X 1 Link to comment
bongobong Posted April 11, 2016 Author Share Posted April 11, 2016 Yes, I didn't want to have to drag it to the right folder as that's laborious. Good call on the popup dialogue; that's a good call. But you reccommend Pashua? Link to comment
bongobong Posted May 17, 2016 Author Share Posted May 17, 2016 Hey Deanishe, So I began using the beta of Alfred 3 and the workflow has stopped working. I'm wondering whether this is something that will get ironed out as Alfred leaves beta or whether it's something to do with the fact that Alfred 3 works differently. Do you have any idea? All best, James. Link to comment
FroZen_X Posted May 18, 2016 Share Posted May 18, 2016 Double click the script that is attached to your Hotkey and change "Alfred 2" to "Alfred 3". Then it works again Link to comment
bongobong Posted May 19, 2016 Author Share Posted May 19, 2016 Thanks so much FroZen_X ! Is there a way of modifying the script to allow me to upload a screenshot to google image search? Currently, I screenshot something, find it in Finder then upload it to google image search with dropzone. Maybe I should make another thread for this. Link to comment
FroZen_X Posted May 19, 2016 Share Posted May 19, 2016 Check this thread out: http://www.alfredforum.com/topic/8811-how-can-i-combine-two-workflows-that-already-exist/ There you can find the function to upload a picture for an image search Rest is just copy pasta. Like with Alfred 3 you can set up really easy a file action that you can add to your current one's. Once done you can search for you file via Alfred and then use the Action on that file or idk combine screenshot with direct upload Link to comment
bongobong Posted June 19, 2016 Author Share Posted June 19, 2016 Is there any way to force the folder picker to always go in alphabetical order? Or a particular order that I stipulate? what tends to happen is the last ones used come up first. Link to comment
olgaz13 Posted September 5, 2016 Share Posted September 5, 2016 Hi, guys, How do you take a screen shot and put it to the clipboard? it does not work for me, they do not show, (they are saved to the desktop) 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