Wednesday, August 19, 2009

Hotkey screen capture and post to Campfire with Spark + Pyro + Applescript + OS X screencapture

I found something _reallly_ handy with applescript (finally!).

Here's the applescript to do an interactive screen capture (os x style) and post the result immediately to a campfire room.

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 -tpng " & quoted form of picPath


tell application "Pyro"

upload picPath to room "roomoncampfire" in campfire "yourcampfiresubdomain.campfirenow.com"

end tell


I tied this to a keystroke with my tool of choice 'Spark':
















Pretty handy, and thanks to some of the existing articles out there, it didn't take long to put together either. Applescript win!

Inspired by: