Sign in to follow this  
Followers 0
byteme

Screenprint To File

3 posts in this topic

Hi all. I have a question. I want to be able to take a screenprint of something and have it piped directly to a file without paint or anything opening. I tried:

send, {printscreen}

fileappend, %CLIPBOARD%, (filename).bmp

the send printscreen works fine, and does do the screen capture, and it does create the bmp file, but there is nothing in that file. Is fileappend only for text, and if so, is there any way to pipe a graphic to a file without anything popping up? Any help would be greatly appreciated. Thank you!

Share this post


Link to post
Share on other sites



Well, the problem is three-fold:

First - Windows doesn't save the screencapture information within the standard clipboard, so that is why the dump of the clipboard contents is not functioning as expected.

Second - AutoIt doesn't really support binary filetypes. There are some characters that will not be written/interpreted as expected.

Third - The screencapture information is not stored in memory via BMP format. This is why paint is usually called to save the raw data within BMP/JPG/etc formats.

If you're just starting out with AutoIt v2, I would recommend trying version 3. There are functions within this version that will allow applications to be opened within hidden windows, and this may be the easiest way to create the desired files. (Especially without spending the huge time/effort in writing your own graphic encoding routines) :whistle:

Hope this helps!

Share this post


Link to post
Share on other sites

Use Capture to make a screenshot (you can preset a keyboard shortcut which can be triggered from within a A2/A3/AHK script - Freeware).

Description:

Capture is a quick-and-easy screen capture utility for Windows (and NT), which allows you to capture the entire screen, at any color depth and resolution, and save it into a Bitmap file for editing. If you are interested in only capturing one window, you can select to capture the active application window only, to save time editing screenshots! Capture runs on the Windows Tray (the lower right corner), and takes a screen capture every time you left click on the picture of a camera (please cut me some slack on the icon, I'm a musician, not an artist, and it was late), and a bitmap will be saved into the directory Capture is running from. You can take as many captures as you want, limited only by your imagination, and harddrive space. To exit Capture, just right click on it, and select 'Exit'; it's just that simple.

Screenshot

Download

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0