Screen Capture Button possible ?

Discussion in 'macOS' started by stuartrozier, Sep 1, 2014.

  1. stuartrozier macrumors regular

    Joined:
    Nov 12, 2011
    #1
    Hello,

    i know theirs a screen capture shortcut for the keyboard, but is their a way of placing a command, terminal script, button, something i keep in the dock, and 'one press' ... it'll capture the screen ?

    many thanks

    stuart
     
  2. Apple fanboy macrumors Core

    Apple fanboy

    Joined:
    Feb 21, 2012
    Location:
    Behind the Lens, UK
    #2
    Command, shift, 3 for screen capture.
    Command, shift, 4 for a snip tool capture.
    Easy to do without terminal etc.
     
  3. stuartrozier thread starter macrumors regular

    Joined:
    Nov 12, 2011
    #3
    Hello, thanks for quick reply- yeah the keyboard shortcuts are good.

    but im tryin to find if thier is a way of placing a button in the dock, that'll do the same thing if you just 'click it' ? ...

    basically, I don't want to use the keyboard,

    thanks
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    Sure... paste this Applescript into the Applescript Editor and save it as an application then put the app in your Dock or wherever you want. Then when you run the app it will bring up the select reticule for you. The screenshot will go to your desktop and increment up each time. Like picture_1 picture_2 etc.

    If you look over the man page for the screen capture command here you can see how to tweak the behavior by changing that -i section.

    Code:
    property N : 0
    set N to N + 1
    set picPath to ((POSIX path of (path to desktop)) & "Picture_" & N & ".png") as string
    do shell script "screencapture -i " & quoted form of picPath
     
  5. Bruno09, Sep 1, 2014
    Last edited: Sep 1, 2014

    Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #5
    Would you like this ?

    Here

    This is a small app (Applescript), put it in your Applications folder, drag it to the Dock.
    I have used the icon of OS X native "Capture".

    To take a screen shot, just click on the icon in the Dock.

    The screen shot will be saved on the Desktop, you could change the destination by editing the script if you want.

    Edit : Hi Weaselboy, I didn't see you had already replied, as I was making the app...
     
  6. stuartrozier thread starter macrumors regular

    Joined:
    Nov 12, 2011
    #6

    sweet ! I'll give it a shot ...
    this is exactly what I meant ...

    thankyou
     
  7. stuartrozier thread starter macrumors regular

    Joined:
    Nov 12, 2011
    #7

    have tried, tested - is exactly what i want, so thank you - have looked on the page with all the codes too, which of the codes will take a screen capture of the full page and save it automatically ? ... and if their is one, will it possible to change the save directory ? - maybe pictures folder? or a custom folder ?

    thank you again
     
  8. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #8
    Sure no problem. The -m flag there will take the whole screen and the new path I put there will put it in your Pictures folder. You need to change where I have yourusername to your real user name.

    Code:
    property N : 0
    set N to N + 1
    set picPath to ("/Users/yourusername/Pictures/" & "Picture_" & N & ".png") as string
    do shell script "screencapture -m " & quoted form of picPath
     
  9. stuartrozier thread starter macrumors regular

    Joined:
    Nov 12, 2011
    #9
    ask a question,

    get a straight answer ...

    your answers and response time has been amazing, don't want to blow your trumpet - but wish their should be more like you on here

    much appreciated
     
  10. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #10
    Ninja'd :D

    Glad it helped you out. I really enjoy trying to figure out these tricks with Applescript. Is really is amazing what you do with it. :)
     

Share This Page