3

I normally take pictures using Photo Booth. But I now need to take a picture in which it takes quite a while for me to get into the right position. Once I am in the right position, it is fine, I can stand as long in that position as I want to. But it takes me at least 30 seconds to get into it and I need both my hands free.

So how do I take a picture with my Mac after 1 minute?

3 Answers 3

6

If you do not want to install any utilities, you can define a workflow using Automator. Among the predefined actions that can be used, there's both Take Picture or Take Video Snapshot, which can be used depending on the camera available:

AutomatorScreenshot.

Define your workflow, and either add a waiting sequence prior to taking a photo as in the screenshot, or call it from the command line with a sleep sequence prepended to adjust the timing:

sleep 60; open /Applications/MyAutomatorPhoto.app

should do that

2
  • Oh, Automator, I should've known... Full disclosure: I found your answer, mttrb's answer and Digital Trauma's answer equally good. So I looked at who had the lowest points and accepted that particular answer. Jun 19, 2019 at 8:55
  • Why doesn't Automator see the iSight camera? It says "No supported cameras found" despite the fact that no other app is currently using the iSight!
    – Michael
    Mar 4, 2020 at 22:25
8

You could do this using a Terminal tool like ImageSnap. ImageSnap can be installed using Homebrew:

$ brew install imagesnap

Or downloaded from GitHub.

You can then schedule a photograph using the -w argument:

$ imagesnap -w 60

imagesnap -h for all the options, including a time-lapse mode.

3
  • That is awesome, I downloaded it. Thanks! Full disclosure: I found your answer, mttrb's answer and Digital Trauma's answer equally good. So I looked at who had the lowest points and accepted that particular answer. Jun 19, 2019 at 8:56
  • Combining this answer with something like termdown (sudo pip install termdown) makes this answer extra fun! Jun 19, 2019 at 9:04
  • Final comment (hopefully): I am also quite surprised with how readable the source is. It is just 500 lines of Objective-C code. Jun 19, 2019 at 9:07
3

You can also use applescript to automate Photo Booth to do what you want:

tell application "Photo Booth" to activate
delay 60
tell application "System Events" to tell application process "Photo Booth"
    click menu item "Take Photo" of menu "File" of menu bar item "File" of menu bar 1
end tell

This can be run from the Script Editor, or as a script passed to osascript at the terminal command-line, as required. In the case of the terminal, terminal.app might need to be added to the Accessibility apps list under Privacy in the Security & Privacy controls in System Preferences: enter image description here

How did I figure out this UI interaction? Generally with the method outlined in my answer here.

3
  • Haha, the why of your answer is awesome. I upvoted both this answer and your why at the other page. Full disclosure: I found your answer, mttrb's answer and Digital Trauma's answer equally good. So I looked at who had the lowest points and accepted that particular answer. Jun 19, 2019 at 8:57
  • @MelvinRoest And yet this answer now has the lowest points and is not the accepted answer...
    – Michael
    Mar 4, 2020 at 22:26
  • A lot can happen in a small year ;-) Mar 4, 2020 at 22:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .