Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 4th, 2006, 1:13 AM   #1
Sane
Banned
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,101
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Save print screen to file OMG GAH

I've made a topic about this earlier, that really didn't help.

I've been searching the question on google for 1 and a half hours now, that really didn't help.

Please help me!! @_@

All I need is a method of saving a freaking picture of the screen to the hard drive.

Everything I find either has to be compiled in Visual Studio, or I need to download ImageMagick (which is freaking confusing to figure out). Or I get so much business crap trying to sell me "Snapshot Pro 2000 Extreme v1239.1".

All I want is the raw solution to saving the clipboard contents as a bmp/png or whatever is necessary!! In whatever format, may it be a call in the operating system or plain Python code. As long as my client doesn't need to install a bunch of programs on his computer...
Sane is offline   Reply With Quote
Old Jan 4th, 2006, 2:25 AM   #2
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Are you looking for a program to do it? Or a way to do it in python?

You could just press that big fat button labeled "print screen" and then open an image editor like paint, and press ctrl+v to paste.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Jan 4th, 2006, 2:35 AM   #3
Nebula
Hobbyist Programmer
 
Nebula's Avatar
 
Join Date: Oct 2005
Posts: 206
Rep Power: 4 Nebula is on a distinguished road
Send a message via AIM to Nebula
Just search Google for "Screenshot Utility" the first of second hit is a nice lil proggy that comes up with a 30 day trial. Very easy to use.

http://www.screenshot-utility.com/ <----I'm assuming your using Windows.

If this dosn't help then i'm not sure what your talking about.
__________________
When will Jesus bring the porkchops?
Nebula is offline   Reply With Quote
Old Jan 4th, 2006, 3:22 AM   #4
Navid
Hobbyist Programmer
 
Navid's Avatar
 
Join Date: Feb 2005
Location: Canada
Posts: 187
Rep Power: 4 Navid is on a distinguished road
Send a message via MSN to Navid
I found this coding, have no idea if it works.

win32api.keybd_event(win32con.VK_PRINT, 0)

win32clipboard.OpenClipboard(0)

data = win32clipboard.GetClipboardData(win32clipboard.CF_BITMAP)

win32clipboard.CloseClipboard()
Navid is offline   Reply With Quote
Old Jan 4th, 2006, 7:32 AM   #5
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
All that code is doing is pressing the "Print Scrn" key and saving the Bitmap data from the clipboard...
__________________

tempest is offline   Reply With Quote
Old Jan 4th, 2006, 7:42 AM   #6
InfoGeek
Professional Programmer
 
InfoGeek's Avatar
 
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4 InfoGeek is on a distinguished road
Quote:
Originally Posted by tempest
All that code is doing is pressing the "Print Scrn" key and saving the Bitmap data from the clipboard...
I think this is what sane wants!
__________________
PFO - My daily dose of technology.
InfoGeek is offline   Reply With Quote
Old Jan 4th, 2006, 11:43 AM   #7
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
print screen, ctr + v in paint (you need support patches for whatever format you want paint to download in) file> save as> PNG
Indigno is offline   Reply With Quote
Old Jan 4th, 2006, 12:14 PM   #8
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
Quote:
Originally Posted by Indigno
print screen, ctr + v in paint (you need support patches for whatever format you want paint to download in) file> save as> PNG
I said that in post #2.
__________________
Join us at #programmingforums @ irc.freenode.net!

My software never has bugs. It just develops random features.
coldDeath is offline   Reply With Quote
Old Jan 4th, 2006, 1:36 PM   #9
a thing
Unverified User
 
a thing's Avatar
 
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0 a thing is on a distinguished road
KDE has a builtin hotkey that you can configure in kcmshell keys (search screens and you'll see it). Paste it in an image editor (like KolourPaint) and save.

The GIMP has something under File>Aquire>Screen Shot...

There's also KSnapShot and GNOME's thing somewhere in the menu.
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted.
Got 'Nux?—GNU/Linux and other free software support.
It's GNU/Linux, not just Linux.
a thing is offline   Reply With Quote
Old Jan 4th, 2006, 1:56 PM   #10
Sane
Banned
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,101
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Quote:
Originally Posted by coldDeath
Are you looking for a program to do it? Or a way to do it in python?

You could just press that big fat button labeled "print screen" and then open an image editor like paint, and press ctrl+v to paste.
You really think I'm that uninformed? When did we learn this, grade 6? :o

Quote:
Originally Posted by Nebula
Just search Google for "Screenshot Utility" the first of second hit is a nice lil proggy that comes up with a 30 day trial. Very easy to use.

http://www.screenshot-utility.com/ <----I'm assuming your using Windows.

If this dosn't help then i'm not sure what your talking about.
I said I don't want my clients having to download a bunch of programs, especially if it only lasts 30 days. And if someone can make a program to do it, so can't I?

Quote:
Originally Posted by Navid
I found this coding, have no idea if it works.

win32api.keybd_event(win32con.VK_PRINT, 0)

win32clipboard.OpenClipboard(0)

data = win32clipboard.GetClipboardData(win32clipboard.CF_BITMAP)

win32clipboard.CloseClipboard()
Yay! That's exactly what I wanted. But I was trying it in C++ so I had to declare data as a global and then do some funky locks and unlocks and it wasn't workin.

Maybe if I did it in Python though, if Python's win modules have GetClipboardData. I think in my last topic for this question It ended with me saying Python's win32modules doesn't support GetBlipboardData.

I'll look for pywin32 for python 2.4, thanks.


EDIT:

Okay, when I tried it in Pyhon 2.4 (with the correct pywin modules), I got this error:

>>> data = win32clipboard.GetClipboardData(2)

Traceback (most recent call last):
  File "<pyshell#5>", line 1, in -toplevel-
    data = win32clipboard.GetClipboardData(2)
error: (6, 'GetClipboardData:GlobalLock', 'The handle is invalid.')
(CF_BITMAP is 2) And yes of course I had taken a screenshot directly before running that command.

Last edited by Sane; Jan 4th, 2006 at 2:11 PM.
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:43 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC