Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <GDIPlus.au3>
- #include <ScreenCapture.au3>
- #include <WindowsConstants.au3>
- #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
- #AutoIt3Wrapper_outfile=dan's Screenshotter.exe
- #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
- #AutoIt3Wrapper_Res_Language=1031
- #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
- HotKeySet("{Printscreen}","_savescreen")
- $splashheight = @DesktopHeight * 20 / 100
- $splashwidth = @DesktopWidth * 20 / 100
- $stringx = $splashwidth - @DesktopWidth / 100 * 6
- $stringy = $splashheight - @DesktopHeight / 100 * 2
- While Sleep(100)
- WEnd
- Func _savescreen()
- Local $scrndir = @DesktopDir&"\Screenshots\"
- Local $scrnsubdir = @DesktopDir&"\Screenshots\"&@MDAY&"."&@MON&"."&@YEAR&"\"
- If FileExists($scrndir) = 0 Then DirCreate($scrndir)
- If FileExists($scrnsubdir) = 0 Then DirCreate($scrnsubdir)
- $filename = @HOUR&@MIN&@SEC&".png"
- $file = $scrnsubdir&$filename
- _ScreenCapture_Capture($file)
- _splashscrn($file,$filename)
- EndFunc
- Func _splashscrn($file,$filename)
- _GDIPlus_Startup()
- $gui = Guicreate("",$splashwidth,$splashheight,0,0,BitOR($WS_POPUPWINDOW,$DS_SETFOREGROUND))
- GUISetState()
- $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
- $hImage = _GDIPlus_ImageLoadFromFile($file)
- _GDIPlus_GraphicsDrawImageRect($hGraphics,$hImage,0,0,$splashwidth,$splashheight)
- _GDIPlus_GraphicsDrawString($hGraphics,$filename,$stringx,$stringy)
- Sleep(3000)
- _GDIPlus_ImageDispose($hImage)
- _GDIPlus_GraphicsDispose($hGraphics)
- _GDIPlus_Shutdown()
- GUIDelete($gui)
- EndFunc
- Func _click()
- MsgBox(64,"","Klick hat es gemacht")
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement