Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to Capture Screenshot

Status
Not open for further replies.

flanakin

Programmer
Mar 21, 2000
158
US
I'm not sure if this is even possible, but does anyone know of a way to capture a screenshot using Javascript?

Any and all help is appreciated! Thanks.

________________________________________
Michael Flanakin
weblogs.getindigo.net/flanakin
 

This cannot be done using JavaScript.

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Is there any way to tie into other libraries that may be on the client's computer? Even if it only works on Windows, it'd still be worth it.

Either way, thanks for the help. I was afraid you'd say that.

________________________________________
Michael Flanakin
weblogs.getindigo.net/flanakin
 

Is there any way to tie into other libraries that may be on the client's computer?

I don't think you can tie it into a library, but you can tie it in to something that every computer with a user in front of it has - the user themselves. Use this JavaScript:

Code:
alert('Press the "Prnt Scrn" key to capture the screen, and paste it into a Word document or image editor, then save');

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
I'm trying to make a simpler way for me to do screenshots, that's all. This isn't for users. Didn't think there'd be a way. Oh well. Thanks, anyway.

________________________________________
Michael Flanakin
weblogs.getindigo.net/flanakin
 
Nah, I'm wanting to write a Firefox plugin that lets me do it quicker. That's all. Not a big deal, but when I am going thru a bunch of pages and getting screenshots, it'd be nice to have something to make it quicker. I'm not saying it's difficult; just repetitive. I don't like repetitive tasks. What's the point in being a programmer if you can't automate repetitive tasks?

________________________________________
Michael Flanakin
weblogs.getindigo.net/flanakin
 
Well, with a firefox extension, you may be able to do it. If Firefox does not already have this feature built into it (I don't think that it does), then it may require writing something in c++ (and compiling it). It would also need to be made accessible via javascript. Then using an extension, you could access it using javascript.

I am personally not 100% sure if it is possible, since I don't really know how it is done, but I would think it would be possible. To that end, this feature might be rather complex to implement, as well. You might consider asking other people more familiar with Firefox development.
Perhaps at Mozillazine?

Mozilla Development:

Extensions Forum:
 
vvlad,
Dude, if this works, I'm gonna kiss you! Well, maybe not, but you'll be my freakin' hero!!!

Kevin,
If vvlad's link doesn't work, I'll def try to get a hold of the Mozilla people. I'd def prefer to stay out of C++, but ya gotta do whatcha gotta do, I guess.

Thanks all!

________________________________________
Michael Flanakin
weblogs.getindigo.net/flanakin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top