Jump to content

Recommended Posts

Here is the GitHub Repo: https://github.com/ginfuru/Alfred-ScreenCapture

 

I write a lot of documents that require me to take screen shots regularly, to show a process or steps for whatever is relavent. So I created this workflow to help me save time, while not having to rely on small apps that site in the menu bar and it fully taking advantage of features that are already built into the OS. 

 

This workflow use a Keyword trigger to capture your screen either as a full screen, a selection, a window or timed PNG file and then opens up the file in Preview for annotating/editing. 

 

Download it - http://rnydm.us/Ndbp        >>> http://i.makitra.in/Ndbp

 

 

If you'd like to change the file format

 

Edit :  

screencapture -icWP ~/Desktop/{query}.png

Change it to: 

screencapture -icWP pdf ~/Desktop/{query}.pdf

You can change this to really whatever format you want. 

 

 

 

If you'd like to change what Application that opens

 

Edit:

screencapture -icWP ~/Desktop/{query}.png

Change it to:

screencapture -icW ~/Desktop/screenshot.png

And link it to the OUTPUT Run Script 

 

 

If you have questions just ask :)

Edited by Ginfuru
Link to post

How do I disable the opening of the image? I just want it saved to the desktop. Thanks!

 

Inside the Run Scripts you'll need to remove the 'P' from them

 

EDIT:
screencapture -icWP ~/Desktop/{query}.png
CHANGE TO:
screencapture -icW ~/Desktop/{query}.png
Edited by Ginfuru
Link to post
  • 9 months later...
  • 2 weeks later...

If I do that, Image doesn't open but It doesn't save the png to desktop!

Any helps?

Takes a screenshot of a window and copys it to your clipboard:
screencapture -icW ~/Desktop/{query}.png

Takse a screenshot of a window and saves to your desktop:
screencapture -iW ~/Desktop/{query}.png
Link to post

many thanks

This could help other people:

 

To take a screenshot of the entire screen and save it to the desktop

screencapture -S ~/Desktop/screen.jpg

 

To take a picture of a window, and save it to the desktop

screencapture -iW ~/Desktop/screen.jpg

 

To take a screenshot of a section of the screen, and save it to the clipboard

screencapture -ic ~/Desktop/screen.jpg

Edited by rspike12
Link to post
  • 1 month later...

One last question on this... Any way to revise the workflow so that the screenshot files are automatically named (e.g. with something like a timestamp) instead of forcing me to assign a name in advance each time?

 

 

If you want to append a timestamp to your screen shots... edit the script to read something like:

now=$(date +"%m_%d_%y at %I.%M.%S%p")
screencapture -icWP ~/Desktop/{query}-$now.png

# echo something
echo  {query}-$now.png

this will append the date and timestamp. 

 

If you want to remove naming the screenshots then update the workflow's 'Keyword' to have 'No Argument' and then edit the script and remove {query}

now=$(date +"%m_%d_%y at %I.%M.%S%p")
screencapture -icWP ~/Desktop/$now.png

# echo something
echo  $now.png
Edited by Ginfuru
Link to post

 

If you want to append a timestamp to your screen shots... edit the script to read something like:

now=$(date +"%m_%d_%y at %I.%M.%S%p")
screencapture -icWP ~/Desktop/{query}-$now.png

# echo something
echo  {query}-$now.png

this will append the date and timestamp. 

 

If you want to remove naming the screenshots then update the workflow's 'Keyword' to have 'No Argument' and then edit the script and remove {query}

now=$(date +"%m_%d_%y at %I.%M.%S%p")
screencapture -icWP ~/Desktop/$now.png

# echo something
echo  $now.png

 

Thanks for this, however the script doesn't seem to be fully working. I've updated it as directed (see below), and while the files are now being automatically named, the file name is only using the month/day/year part of the script. So when I take a screenshot, it's automatically naming it with a datestamp "03_02_14" but not including a timestamp (minutes/hours/seconds) in the file name. As a result, if I take a second screenshot, it automatically overwrites the first as they both have the same name. 

 

The script in this instance is...

now=$(date +"%m_%d_%y at %I.%M.%S%p")

screencapture -i ~/Downloads/$now.jpg

# echo something
echo  $now.jpg

What have I done wrong?

Link to post

Thanks for this, however the script doesn't seem to be fully working. I've updated it as directed (see below), and while the files are now being automatically named, the file name is only using the month/day/year part of the script. So when I take a screenshot, it's automatically naming it with a datestamp "03_02_14" but not including a timestamp (minutes/hours/seconds) in the file name. As a result, if I take a second screenshot, it automatically overwrites the first as they both have the same name. 

 

The script in this instance is...

now=$(date +"%m_%d_%y at %I.%M.%S%p")

screencapture -i ~/Downloads/$now.jpg

# echo something
echo  $now.jpg

What have I done wrong?

You changed the screencapture command. 

 

Here is a link to an updated workflow just for you: http://i.makitra.in/UBol

 

if you don't want to open the screen shots remove the "P"  just before ~/Desktop/$now.png

Edited by Ginfuru
Link to post

Thanks so much for all your help with this, but it's still not working for me.

 

I had taken your original workflow and made some changes based on how I tend to use screenshots. Here's the version of the workflow that I'm using... http://www.filedropper.com/screenshots.

 

Essentially, I have three 'types' of screenshots, each with the choice to either do a window or selection capture (I don't ever had a need for full screen or timed). The 'types' of screenshots can be summarized as follows...

 

- Edit: In this case, the screenshot is opened in an editing application (Skitch in my case) immediately following the capture. I can then save it out from there once the edits are made.

 

Save: In this case, the screenshot is saved (as is) directly to my 'Downloads' folder immediately following capture.

 

- Copy: In this case, the screenshot is saved (as is) directly to my clipboard immediately following capture.

 

I've got the workflow working great aside from the ability to have the screenshots automatically assigned a name each time instead of having to manually enter it myself. If I make the changes you recommend, it works fine in some of the situations but seems to blow up my functionality in others (e.g. opening in Skitch).

 

Any assistance you can provide would be greatly appreciated. Thanks again for the help!

Edited by gsmth00
Link to post

Thanks so much for all your help with this, but it's still not working for me.

 

I had taken your original workflow and made some changes based on how I tend to use screenshots. Here's the version of the workflow that I'm using... http://www.filedropper.com/screenshots.

 

Essentially, I have three 'types' of screenshots, each with the choice to either do a window or selection capture (I don't ever had a need for full screen or timed). The 'types' of screenshots can be summarized as follows...

 

- Edit: In this case, the screenshot is opened in an editing application (Skitch in my case) immediately following the capture. I can then save it out from there once the edits are made.

 

Save: In this case, the screenshot is saved (as is) directly to my 'Downloads' folder immediately following capture.

 

- Copy: In this case, the screenshot is saved (as is) directly to my clipboard immediately following capture.

 

I've got the workflow working great aside from the ability to have the screenshots automatically assigned a name each time instead of having to manually enter it myself. If I make the changes you recommend, it works fine in some of the situations but seems to blow up my functionality in others (e.g. opening in Skitch).

 

Any assistance you can provide would be greatly appreciated. Thanks again for the help!

My reason for making this workflow to was to eliminate the need to an app like Skitch... I believe Skitch has keyboard triggers which would be faster than using Alfred, if that's the route you're using to create your screenshots. 

 

To assign a name just do what I suggested and it will assign the date and time as the file name. 

 

To copy to your clipboard... add    -c     

screencapture -c
Edited by Ginfuru
Link to post
  • 5 months later...
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...