Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Create a screenshot and display it immediately' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a screenshot and display it immediately
Authored by: ryanerwin on Jan 05, '06 10:36:51PM

Modified this a bit to default the screenshot to window mode and to save multiple files inside a single directory. Files are named sequentially, based on time and stored in the pictures folder. Just paste it into Script Editor. I save it with a bunch of other scripts in my ~/Favorites folder and use LaunchBar to access them.

do shell script "DATE=`date '+%Y%d%m-%H%M%S'`;
FILE=~/Pictures/screenshot-${DATE}.png;
screencapture -i -W -x $FILE;
if [ -e $FILE ]; then
open /Applications/Preview.app $FILE;
fi"

Other scripts I have in that directory include:
* Activate Plantronics Headset.scpt (Great for switching to your USB headset)
* Each Email in Address Book.scpt (Handy to export address book to my SpamAssassin whitelist)
* Grab Screenshot and Show it Now.scpt (The one above)
* Maximize Frontmost Window.scpt (Integrated with iKey and CMD+SHIFT+Z)
* Foreign Entry Requirements - Visa - USA State Dept.webarchive (Decide which country I'll visit this month. Looks like Malaysia next week...)
* UNESCO World Heritage Center Sites - Map.webloc (Some amazing places to see!)
* World Clock - Time Zones.webloc (What time is it back in the states???)



[ Reply to This | # ]
Create a screenshot and display it immediately
Authored by: blafusel on Jan 06, '06 11:04:59PM

So much more elegant! Is this bash shell? Can it be changed to excute tcsh or csh instead?

Thanks for all the comments and suggestions! This is great!



[ Reply to This | # ]