Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.59 KB | None | 0 0
  1. #include <GDIPlus.au3>
  2. #include <ScreenCapture.au3>
  3. #include <WindowsConstants.au3>
  4. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  5. #AutoIt3Wrapper_outfile=dan's Screenshotter.exe
  6. #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
  7. #AutoIt3Wrapper_Res_Language=1031
  8. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  9. HotKeySet("{Printscreen}","_savescreen")
  10. $splashheight = @DesktopHeight * 20 / 100
  11. $splashwidth = @DesktopWidth * 20 / 100
  12. $stringx = $splashwidth - @DesktopWidth / 100 * 6
  13. $stringy = $splashheight - @DesktopHeight / 100 * 2
  14. While Sleep(100)
  15. WEnd
  16.  
  17. Func _savescreen()
  18.     Local $scrndir = @DesktopDir&"\Screenshots\"
  19.     Local $scrnsubdir = @DesktopDir&"\Screenshots\"&@MDAY&"."&@MON&"."&@YEAR&"\"
  20.     If FileExists($scrndir) = 0 Then DirCreate($scrndir)
  21.     If FileExists($scrnsubdir) = 0 Then DirCreate($scrnsubdir)
  22.     $filename = @HOUR&@MIN&@SEC&".png"
  23.     $file = $scrnsubdir&$filename
  24.     _ScreenCapture_Capture($file)
  25.     _splashscrn($file,$filename)
  26. EndFunc
  27.  
  28. Func _splashscrn($file,$filename)
  29.     _GDIPlus_Startup()
  30.         $gui = Guicreate("",$splashwidth,$splashheight,0,0,BitOR($WS_POPUPWINDOW,$DS_SETFOREGROUND))
  31.         GUISetState()
  32.         $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
  33.         $hImage = _GDIPlus_ImageLoadFromFile($file)
  34.         _GDIPlus_GraphicsDrawImageRect($hGraphics,$hImage,0,0,$splashwidth,$splashheight)
  35.         _GDIPlus_GraphicsDrawString($hGraphics,$filename,$stringx,$stringy)
  36.         Sleep(3000)
  37.         _GDIPlus_ImageDispose($hImage)
  38.         _GDIPlus_GraphicsDispose($hGraphics)
  39.         _GDIPlus_Shutdown()
  40.         GUIDelete($gui)
  41. EndFunc
  42.  
  43. Func _click()
  44.     MsgBox(64,"","Klick hat es gemacht")
  45. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement