Jump to content



Photo

AutoIt Windows Screenshooter v1.66 Build 2013-05-14

screencapture region full screen gdi+ webshot video watermark pdf ruler image editor

  • Please log in to reply
102 replies to this topic

#1 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 06 December 2010 - 11:18 PM

AutoIt Windows Screenshooter

Key Features:

  • takes easily a screenshot from any visible window
  • capture any region of the desktop incl. freehand capturing
  • capture GUI controls and GUI menus separately
  • capture a marked area every x seconds for a duration of y seconds
  • capture to AVI file
  • takes a screenshot from web sites (available only on Vista+ os and when Aero is enabled)
  • put images to clipboard to paste to other applications easily
  • color picker
  • save image in different formats and also to PDF!
  • add timestamp to saved images
  • simple image editing options: greyscale, b&w, invert, rotate +-90°
  • send image to printer and default email client
  • preview of captured screens incl. zoom option
  • multi monitor support
  • display pixel color under mouse
  • ruler
  • basic image editor (paint, highlight, ellipse, rectangle, text and some graphic FX
  • watermark captured image
  • no 3rd party tools or DLLs used - pure AutoIt!
  • fully portable - no installation is needed

To do:

  • capture content of scrollable window/control
  • capture cascaded menus

Due to DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) limitation some windows cannot be captured properly (GDI+, ProgDVB, etc.) but can take screenshots of hidden windows. One workaround is to use full screen capturing (F11/F12) or "Grab Screen" function! Or try double click with rmb on listview items (beta). :D



Download source code (2494 downloads previously): AutoIt Windows Screenshooter (701kb)

You are not allowed to sell this code or just parts of it in a commercial project or modify it and distribute it with a different name!


Download compiled Exe only: 4shared.com / Media Fire / Softpedia (1.37mb)

Distributing copies of the program in compiled format (exe) must be free of any fee!


btn_donate_74x21.gif-----> click here to Donate!




It is designed for Vista+ operating systems with AERO enabled! E.g. on WinXP machines some functions are not working properly and might crash the application!


Be aware to deactivate DEP or add Windows Screenshooter exe to the exception list otherwise it will hard crash on some functions, e.g. About Intro, image editing functions. Further AV scanners may a negative impact the execution of compiled exe!



Main GUI:
Screenshooter.jpg

 

 

About Intro:

Screenshooter_About.jpg
 

 

Basic Image Editor:

Screenshooter_ImageEditor.jpg

 

 

Watermark:

Watermark.jpg

 

 

Click link for an enhanced version of Watermark Image. ;)



Credits:

  • main code by UEZ
  • additional code (alphabetical order) by AndyG, Authenticity, AutoItObject Team, Eemuli, eukalyptus, funkey, _Kurt, martin, monoceres, ProgAndy, taietel, TheShadowAE, trancexx, Ward, wolf9228 and Yashied!

Code is too long to post it here directly! Sorry. :(



Use following keys:

User your mouse to scroll preview window or

Numpad ↑ 8: Scroll preview window up
Numpad ↓ 2: Scroll preview window down
Numpad ← 4: Scroll preview window left
Numpad → 6: Scroll preview window right
Numpad +: zoom in preview window or mousewheel down
Numpad -: zoom out preview window or mousewheel up

F5: refresh Windows Name list
PRINTSCREEN: take screenshot from whole screen using PRINTSCREEN code
ALT+PRINTSCREEN:take a screenshot from active window using ALT+PRINTSCREEN build-in code
F10: Undo made changes with Image Editing function
F11: take screenshot from whole screen incl mouse cursor
F12: take screenshot from whole screen
Ctrl+Alt+F12: take a screenshot of active window using alternative screenshot functionality (beta). should work also for some games :D !

Only available on Vista+ os: double click with rmb on list items to use alternative screenshot functionality (beta)!

When 'Grab Screen' is clicked you can hold down the ctrl key to switch to 'grab controls' mode. Control under mouse will be framed red.
ctrl + shift will take the screenshot of appropriate control. To capture GUI menues you can press rmb which simulates the lmb. When a menu is opened press shift additionaly to capture it.
Press and hold only the shift key to capture any region on the desktop using freehand capturing - release it so capture marked regions!
Or just mark resizeable area which you want to grab. Press CTRL key to grab marked area or right mouse button to capture the marked area every x seconds for a duration of y seconds.

When saving the image just enter the extension you whish to use (*.jpg;*.png;*.bmp;*.gif;*.tif;*.pdf). Big thanks to taietel for his PDF UDF!


Maybe it is useful for someone...


Any kind of comment is welcome.

Br,
UEZ


Change log:

Spoiler


Edited by UEZ, Yesterday, 02:25 PM.

  • Zoldex, wakillon and JScript like this

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯






#2 ValeryVal

ValeryVal

    Dig the way

  • Active Members
  • PipPipPipPipPipPip
  • 422 posts

Posted 08 December 2010 - 08:44 AM

Here a small tool I wrote to make screenshots from non minimized windows and selectable regions on desktop!


Thank you.
BTW. I can't get screenshot by this from ProgDVB window and use My Scripts in this case.
The point of world view

#3 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 08 December 2010 - 10:49 AM

I don't have a ProgDVB card to test it yet only an USB DVB-T card! I will test it for DVB-T and when it is not working I will have a look to your code!

Thanks for the hint!


Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#4 ValeryVal

ValeryVal

    Dig the way

  • Active Members
  • PipPipPipPipPipPip
  • 422 posts

Posted 08 December 2010 - 11:46 AM

I don't have a ProgDVB card

ProgDVB is "Universelle und leistungsfähige Software für digitales Fernsehen und zum Hören von Radioprogrammen."
See here - progDVB
ProgDVB works with DVB-S,DVB-S2,DVB-T & DVB-C
This pic was created by my script now from France 24.

Attached Thumbnails

  • 2010120800_144.jpg

The point of world view

#5 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 09 December 2010 - 03:47 PM

I update the code a little bit.


Although the interest is rather low have a look to post#1 if you like.

Br,
UEZ

Edited by UEZ, 09 December 2010 - 06:44 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#6 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 07 January 2011 - 08:46 PM

Made some updates.

Maybe your are interested maybe not - you decide!

Last update for now!

Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#7 taietel

taietel

    I'm the third from the left...

  • Active Members
  • PipPipPipPipPipPip
  • 722 posts

Posted 08 January 2011 - 04:54 PM

Thanks UEZ! :x

#8 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 12 January 2011 - 09:24 PM

@taietel: your are welcome and here an updated version for you!

Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#9 taietel

taietel

    I'm the third from the left...

  • Active Members
  • PipPipPipPipPipPip
  • 722 posts

Posted 13 January 2011 - 01:04 AM

Thanks again UEZ! I'm still studying your GDI+ scripts :x. I have made a game for my son (with numbers on the buttons) and now I'm trying to somehow split a given image into small ones (a matrix) and then randomly put them on the buttons (like a shuffled puzzle). DON'T TELL ME THE SOLUTION! When I'll give up, I'll shout.

M.I.

#10 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 15 January 2011 - 10:27 PM

Another update. Read change log and additional information on 1st post if you like for more information.

Have a look to the About intro part - maybe you will like it :x

Br,
UEZ

Edited by UEZ, 15 January 2011 - 10:30 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#11 taietel

taietel

    I'm the third from the left...

  • Active Members
  • PipPipPipPipPipPip
  • 722 posts

Posted 15 January 2011 - 11:03 PM

... maybe you will like it


Are you kidding me?! I'm speechless... Man, you're a G(diplus)enius!

#12 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 22 January 2011 - 01:16 AM

Here an update with some small improvement.

I'm not happy with the method to make screenshots of maximized windows because of the black frame!

Maybe somebody knows a better way to do it...


Br,
UEZ

PS: for the Intro part press on the left upper icon from the window and select About... :)

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#13 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 22 January 2011 - 01:16 AM

Here an update with some small improvements.

I'm not happy with the method to make screenshots of maximized windows because of the black frame and not taking screenshots properly from GDI+ windows!
DllCall("User32.dll", "int", "PrintWindow", "hwnd", $hWnd, "handle", $hMemDC, "int", 0) ist not the best choice...

Maybe somebody knows a better way to do it...


Br,
UEZ

PS: for the Intro part press on the left upper icon from the window and select About... :)

Edited by UEZ, 24 January 2011 - 09:57 AM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#14 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 26 January 2011 - 12:08 PM

This is the last update for this code, unless I or you find some bugs, etc.

Read the change log (history) on 1st post for more details.

Br,
UEZ

Edited by UEZ, 26 January 2011 - 03:57 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#15 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 27 February 2011 - 11:42 PM

Actually I didn't want to post an update but I detected a memory leak. If you display any screenshot the memory of the bitmap wasn't freed up. :)

It should be fixed now.

Further I added a zoom preview window when you want to grab the screen more precisely.

Br,
UEZ

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#16 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 8,841 posts

Posted 28 February 2011 - 01:36 AM

I like this, Great work, only thing I see causing a problem is that, (for me at least) it freezes and crashes, if you do not use the exit button.

AMD Athlon II
32 bit Win 7
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)

#17 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 28 February 2011 - 08:31 AM

I like this, Great work, only thing I see causing a problem is that, (for me at least) it freezes and crashes, if you do not use the exit button.

AMD Athlon II
32 bit Win 7


Thanks for your feedback! :)

Hmm, odd. I cannot reproduce the freezes and/or crashes. Does it crash/freeze after or before fade out when you close the program?

Exit button and X button calling the same exit function. ;)

Someone else with same problem?

Br,
UEZ

Edited by UEZ, 28 February 2011 - 06:29 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#18 JohnOne

JohnOne

    John

  • Active Members
  • PipPipPipPipPipPip
  • 8,841 posts

Posted 28 February 2011 - 09:14 AM

When using the window close x it imediately freezes the screen for a while (between 5 and 30 seconds I've observed) then fades out and I get the windows notice that its stopped working, and should I debug, look online for solution, or close the program.
AutoIt Absolute Beginners Require a serial
Run('hh mk:@MSITStore:'&StringReplace(@AutoItExe,'.exe','.chm')&'::/html/tutorials/helloworld/helloworld.htm','',@SW_MAXIMIZE)

#19 UEZ

UEZ

    Never say never

  • MVPs
  • 3,603 posts

Posted 28 February 2011 - 10:02 AM

This is the exit function from line 1489:

AutoIt         
Func _Exit() ;g1     DllCall("user32.dll", "int", "UnhookWindowsHookEx", "hwnd", $hM_Hook[0])     $hM_Hook[0] = 0     DllCallbackFree($hKey_Proc)     $hKey_Proc = 0 ;g2     GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "")     DllClose($dll) ;g3     _WinAPI_DeleteObject ($hBitmap_s)     _WinAPI_DeleteDC($hMemDC)     _WinAPI_DeleteObject($memBitmap)     _WinAPI_ReleaseDC(0, $hDC_Region)     _WinAPI_DeleteDC($hDC_Region) ;g4     _GDIPlus_GraphicsDispose($hImageContext)     _GDIPlus_BitmapDispose($hBackImage)     _GDIPlus_BitmapDispose($vBitmap)     _GDIPlus_BitmapDispose($undo)     _GDIPlus_MatrixDispose($hMatrix)     _GDIPlus_BrushDispose($hBrush_Clear)     _GDIPlus_BitmapDispose($hBmp)     _GDIPlus_GraphicsDispose($hContext)     _GDIPlus_BitmapDispose($hBuffer_Bmp)     _GDIPlus_GraphicsDispose($hGraphic)     _GDIPlus_Shutdown() ;g5     _WinAPI_AnimateWindow($hGUI, BitOR($AW_BLEND,  $AW_HIDE), 750) ;g6     GUIDelete($hGUI)     Exit EndFunc   ;==>_Exit


Can you uncomment g1 and g3 block and try again?


Btw, I update the code again.

Thanks,
UEZ

Edited by UEZ, 28 February 2011 - 01:34 PM.

 
The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯


#20 Aktonius

Aktonius

    Prodigy

  • Active Members
  • PipPipPip
  • 182 posts

Posted 23 July 2011 - 02:31 AM

wonderful job, ty





Also tagged with one or more of these keywords: screencapture, region, full screen, gdi+, webshot, video, watermark, pdf, ruler, image editor

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users