jaberwacky 327 Posted April 21, 2010 (edited) It's a buggy, ugly, and nasty proof of concept at this stage. Tell me what ya'll think. newest version Worked out the double buffer by looking at these examples by UEZ: (http://www.autoitscript.com/forum/index.php?showtopic=87200&st=0&p=625623&#entry625623) expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseUpx=n #AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;~ #include <HandyFunctions.au3> #include <array.au3> HotKeySet("{ESC}", "_terminate") OnAutoItExitRegister("_endGDI") Global $DW = @DesktopWidth, $DH = @DesktopHeight, $penWidth = 5, $penColor, $brushColor Global $X, $Y, $color, $circleWidth = 1000, $radius = $circleWidth / 2, $XYBound = $penWidth + 5 Global $GUI = GUICreate("ScreenSaver", $DW, $DH, 0, 0, $WS_POPUP) GUISetState() _GDIPlus_Startup() Global $hGraphics = _GDIPlus_GraphicsCreateFromHWND($GUI) Global $hBitmap = _GDIPlus_BitmapCreateFromGraphics($DW, $DH, $hGraphics) Global $backBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap) Global $hPen = _GDIPlus_PenCreate(0x77000000, $penWidth) Global $hBrush = _GDIPlus_BrushCreateSolid() ;~ _GDIPlus_GraphicsClear($backBuffer) Do $color = _Color() $brushColor = _Color() $X = Random($XYBound, $DW - $XYBound, 1) $Y = Random($XYBound, $DH - $XYBound, 1) If $X < $Y Then $circleWidth = $DH - $Y Else $circleWidth = $DW - $X EndIf For $i = $penWidth To $circleWidth Step $penWidth _drawCircle() ;~ Sleep(1) Next For $i = $circleWidth To $penWidth Step -$penWidth _drawCircle() ;~ Sleep(1) Next Until GUIGetMsg() = $GUI_EVENT_CLOSE Exit Func _drawCircle() _GDIPlus_GraphicsClear($backBuffer, $color) _GDIPlus_BrushSetSolidColor($hBrush, $brushColor) _GDIPlus_PenSetColor($hPen, $brushColor) _GDIPlus_GraphicsFillEllipse($backBuffer, $X, $Y, $i, $i, $hBrush) _GDIPlus_GraphicsDrawEllipse($backBuffer, $X, $Y, $i, $i, $hPen) _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, $DW, $DH) EndFunc ;==>_drawCircle Func _Color() Local $hexColor = "0xFF" & Hex(Random(0, 255, 1) & Random(0, 255, 1) & Random(0, 255, 1), 6) If $hexColor = 0xFF000000 Then _Color() Else Return $hexColor EndIf EndFunc ;==>_backGroundColor Func _endGDI() _GDIPlus_PenDispose($hPen) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_Shutdown() _terminate() EndFunc ;==>_endGDI Func _terminate() Exit (0) EndFunc ;==>_terminate Edited April 22, 2010 by jaberwocky6669 Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
somdcomputerguy 103 Posted April 21, 2010 C:\Users\Public\screensavertest.au3(6,10) : ERROR: can't open include file <HandyFunctions.au3> - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites
jaberwacky 327 Posted April 21, 2010 C:\Users\Public\screensavertest.au3(6,10) : ERROR: can't open include file <HandyFunctions.au3>OK, I think it's good to go now... Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites
somdcomputerguy 103 Posted April 21, 2010 It runs fine now. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Share this post Link to post Share on other sites
AdmiralAlkex 125 Posted April 22, 2010 (edited) The circle flickers to much, it hurts my eyes. Take a look at the GDI+ scripts that float around and see what they do to avoid that.What MvGulik said. It's pretty annoying with the quick color jumps, some fading would be nice. Edited April 22, 2010 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Share this post Link to post Share on other sites
jaberwacky 327 Posted April 22, 2010 I will heed all advice, thanks! Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Share this post Link to post Share on other sites