Screengrab Ubiquity Script
Firefox users with the Ubiquity extension installed might like to try my Screengrab script which provides the commands:-
- ‘screengrab’ — saves the current browser window to the clipboard, and
- ‘screengrab-to-file’ — saves the current browser window to a png image file.
Once the screengrab command has been issued, the image can be simply pasted from the cilpboard into webmail emails such as GMail.
I’d like to eventually extend the script to provide a ‘screengrab-and-email’ command.

Awesome! This has to be the easiest thing i’ve seen for screen caps of web pages.
It seems to get confused when capturing the full page on some sites – cutting off the bottom, or only getting the window (this page, for example). And i couldn’t get the clipboard copy to work at all.
Also – the default file save location on Mac (~/Library/Caches/TemporaryItems/) is a little out-of-the way, and Spotlight doesn’t scan there, so it’s hard to find them quick after a grab. Any way to change that?
Hi Jeremiah, thanks for the feedback.
I’ve noticed the issue not capturing the whole screen as well, seems to happen on sites that use CSS heavily, I’ll see if I can track down this issue.
Clipboard copy can at the moment only paste into Firefox textareas, e.g. a GMail message. Does this work for you?
With regards to the location images are saved, I’ll see if I can default to the user’s desktop or similar and only use the temp folder if this fails.
I’ll update this post if I manage to get a new version out.
Appreciate the comments, ta.
Excellent. Not sure if you’ve updated anything yet, but on Windows (just installed the script) i do get the full document captured on this page. And yes, pasting into Gmail works – i just didn’t realize that would be different from pasting into Photoshop.
Ditto on the save location on Windows – it’s the user’s Temp folder (C:\Documents and Settings\USER\Local Settings\Temp).
Desktop or somewhere in the user folder would definitely be more handy.
This is exactly what I’m looking for, unfortunately I can’t get it to work on firefox under linux. It takes a screenshot, but for some reason nothing shows up in the actual browser region of the resulting image, just blank gray space.
Hi lowtolerance, I’m sorry to hear the script isn’t working. I developed it under Firefox/Linux so it has been tested in an environment similar to yours…
If you tell me a little about your setup I might be able to reproduce and fix the issue. E.g. which Firefox version and Linux distro are you running and are you using compiz or not? Also, do you see the screenshot in the Ubiquity preview pane (like in the grab at the top of this post) and which command are you using (screengrab, -all, -to-file, etc), does the problem apply to all commands?
And does the problem occur on all websites?
Many thanks
Just a follow-up to the Temp file save location. On Mac that TemporaryItems folder is emptied on a restart – i just lost a bunch of images i didn’t move to another folder.
So it’s sort of a dangerous place to have captures saved.
Also wanted to let you know that i’ve been using the script a lot lately – it’s so fast and easy. Thanks again.
great work! is there any possibility to screen capture a specified screen REGION and not the whole screen? This would be useful so as not to paste unnecessary information into webmail … thoughts??
Hey Richard, thanks for the feedback.
It would be useful to capture a region of the screen I agree. I’m just not sure how this could best work as a Ubiquity command.
You could have the command screengrab-region, which accepted x, y, width and height coordinates as arguments, e.g.
screengrab-region 0 20 300 200
Though I can’t imagine many people will know the coordinates of the area they want to capture.
Another option would be to allow the user to drag a rectangle area with the mouse. The issue I have with this though is that it doesn’t fit in well with the Ubiquity command model. And is perhaps more in the realm of a Firefox extension (like the Screengrab! extension say).
Do you have any thoughts about how this feature could be implemented? Cheers.
I read this post to know about screengrab http://blog.xuite.net/emisjerry/tech/20320408
(it`s Chinese)
It`s great ubiquity command !
But I have trouble with capture this site
http://blog.yam.com/joy0616/article/19431407
(It`s also chinese and it takes very long page with may pictures)
have any ideas to fix this ?
Hi Eric. You’re right, can’t seem to screengrab that page either. I would however guess the problem is related to a memory limit enforced for Firefox extensions (though I haven’t checked). The height of that web page is something like 50,000 pixels (that’s about 50 screens) and I think this is just too large to hold in memory all at once (a quick calculation suggests about 150 megabytes would be needed…).
This would be another reasonable use case for @Richard Gasper’s earlier suggestion of capturing a region rather than the entire page… perhaps a feature I will look in to developing…
I fully agree and support the idea of screengrab-to-gmail
Maybe I could help as that’s something I need very often and I did a small ubiquity plugin myself, what’s the problem with having it to work with gmail? Have you looked into it?
This is a great command, thanks for publishing it.