Hier habe ich unbewusst einen "Kometenschweif" gemacht (dabei wollte ich doch Pong machen...)
Script:
Spoiler anzeigen
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.5.6 (beta)
Author: Alizame
Script Function:
It makes a kometenschweif
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GDIPlus.au3>
#include <Misc.au3>
;###
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Kometenschweif by Alizame", 800, 600)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
;###
$farbewei = 0xFFFFFFFF
$farbeschwar = 0xFFFFFFFF
$Ball = 40
$iX = 400
$iY = 300
$iXold = 400
$iYold = 300
$bewegung = 1
_GDIPlus_Startup()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($Form1)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics(800,600,$hGraphics)
$Buffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$bWei = _GDIPlus_BrushCreateSolid($farbewei)
$bSch = _GDIPlus_BrushCreateSolid($farbeschwar)
$smooth = _GDIPlus_GraphicsSetSmoothingMode($hGraphics,2)
_ReDraw ()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_GDIPlus_ImageDispose($Buffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_BrushDispose($bWei)
_GDIPlus_BrushDispose($bSch)
_GDIPlus_GraphicsDispose($hGraphics)
_GDIPlus_Shutdown()
Exit
EndSwitch
If _IsPressed("25") Then $iX -= $bewegung
If _IsPressed("26") Then $iY -= $bewegung
If _IsPressed("27") Then $iX += $bewegung
If _IsPressed("28") Then $iY += $bewegung
If $iX <> $iXold Or $iY <> $iYold Then _ReDraw ()
WEnd
Func _ReDraw ()
_PosCorrect ()
_GDIPlus_GraphicsClear($Buffer,$bSch)
_GDIPlus_GraphicsFillEllipse($Buffer,$iX,$iY,$Ball,$Ball,$bWei)
_GDIPlus_GraphicsDrawImageRect($hGraphics,$hBitmap,0,0,800,600)
$iXold = $iX
$iYold = $iY
EndFunc
Func _PosCorrect()
ToolTip("x="&$iX&@CRLF&"y="&$iY,0,0)
If $iX < 0 Then $iX = $iX * -1
If $iY < 0 Then $iY = $iY * -1
If $iX > 760 Then $iX = $iX * -1
If $iY > 560 Then $iY = $iY * -1
EndFunc
....