1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. DFPWare

Beiträge von DFPWare

  • _GetIPLocation

    • DFPWare
    • 3. Mai 2011 um 17:55

    @Sparky Hä? das ist total egal, nur does not ist ausgeschrieben, wir dürfen in einer englischarbeit gar keine Abkürzungen mehr verwenden

    DFPWare

  • Windows Rechner nach gebaut Help?

    • DFPWare
    • 2. Mai 2011 um 18:28

    Es muss am Ende so heißen:

    Spoiler anzeigen
    [autoit]

    Case $btn_zeichen_gleich
    $ergebnis = GUICtrlRead($input_aufgabe)
    $execute = Execute($ergebnis)
    $output_ergebnis = GUICtrlDelete($output_ergebnis)
    $output_ergebnis = GUICtrlCreateInput($execute, 16, 16, 353, 21)

    [/autoit]

    Außerdem solltest du

    [autoit]

    $output_ergebnis = GUICtrlDelete($output_ergebnis)
    $output_ergebnis = GUICtrlCreateInput($execute, 16, 16, 353, 21)

    [/autoit]

    durch

    [autoit]

    guictrlsetdata($output_ergebnis,$execute)

    [/autoit]

    ersetzen

    DFPWare

  • Windows Rechner nach gebaut Help?

    • DFPWare
    • 2. Mai 2011 um 18:11

    Hier mal ein einfacher Rechner:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    $Form1 = GUICreate("Form1", 223, 185, 192, 124)
    $_i = GUICtrlCreateInput("", 16, 16, 193, 21)
    $_1 = GUICtrlCreateButton("1", 16, 48, 35, 33, $WS_GROUP)
    $_2 = GUICtrlCreateButton("2", 56, 48, 35, 33, $WS_GROUP)
    $_3 = GUICtrlCreateButton("3", 96, 48, 35, 33, $WS_GROUP)
    $_4 = GUICtrlCreateButton("4", 136, 48, 35, 33, $WS_GROUP)
    $_5 = GUICtrlCreateButton("5", 176, 48, 35, 33, $WS_GROUP)
    $_6 = GUICtrlCreateButton("6", 16, 88, 35, 33, $WS_GROUP)
    $_7 = GUICtrlCreateButton("7", 56, 88, 35, 33, $WS_GROUP)
    $_8 = GUICtrlCreateButton("8", 96, 88, 35, 33, $WS_GROUP)
    $_9 = GUICtrlCreateButton("9", 136, 88, 35, 33, $WS_GROUP)
    $_10 = GUICtrlCreateButton("=", 176, 136, 35, 33, $WS_GROUP)
    $_11 = GUICtrlCreateButton("+", 16, 136, 35, 33, $WS_GROUP)
    $_12 = GUICtrlCreateButton("-", 56, 136, 35, 33, $WS_GROUP)
    $_13 = GUICtrlCreateButton("*", 96, 136, 35, 33, $WS_GROUP)
    $_14 = GUICtrlCreateButton("/", 136, 136, 35, 33, $WS_GROUP)
    GUISetState(@SW_SHOW)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $_1
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "1")
    Case $_2
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "2")
    Case $_3
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "3")
    Case $_4
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "4")
    Case $_5
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "5")
    Case $_6
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "6")
    Case $_7
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "7")
    Case $_8
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "8")
    Case $_9
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "9")
    Case $_10
    $read = GUICtrlRead($_i)
    MsgBox(0,"Ergebnis:",Execute($read))
    Case $_11
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "+")
    Case $_12
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "-")
    Case $_13
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "*")
    Case $_14
    $read = GUICtrlRead($_i)
    GUICtrlSetData($_i,$read & "/")
    Exit
    EndSwitch
    WEnd

    [/autoit]
  • Windows Rechner nach gebaut Help?

    • DFPWare
    • 2. Mai 2011 um 17:53

    zum Beispiel

    [autoit]

    MsgBox(0,"",Execute("12+15")

    [/autoit]

    DFPWare

    Edit: Das was du aus der InputBox ausliest ist ein String, also eine Zeichenkette(mit Anführungszeichen) diese kann man nicht so einfach ausrechnen, wie z.B

    [autoit]

    $ergebnis = 12+15

    [/autoit]

    Hier sind nämlich 12 und 15 Zahlen und keine Strings

    Ich werd dir gleich mal nen kleines Bsp basteln ;)

  • Windows Rechner nach gebaut Help?

    • DFPWare
    • 2. Mai 2011 um 17:41

    Warum schreibst du alle Schritte in eine Textdatei?

    Um dein Problem zu lösen empfehle ich

    [autoit]

    Execute

    [/autoit]
  • Neueste Windowsfeatures

    • DFPWare
    • 1. Mai 2011 um 20:55

    Wer weiß ;)

    Vielleicht mit dllcalls oder sowas ;)

    DFPWare

  • UDF erstellen

    • DFPWare
    • 1. Mai 2011 um 19:04

    Ich fürchte du musst mir doch helfen ;)

    Soweit bin ich:

    Spoiler anzeigen
    [autoit]

    ;Lade3
    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    #include <WinAPI.au3>
    Global $w,$h,$angle,$r,$startangle,$brush[16],$brushWeiss,$graphic,$bitmap,$buffer, $hWnd
    ;#Beispiel Start
    OnAutoItExitRegister("Load_shutdown")
    $gui = GUICreate("GUI",300,300,100,100,$GUI_SS_DEFAULT_GUI, $WS_EX_LAYERED)
    Load_startup($gui,300,300)
    GUISetState()
    AdlibRegister("Load_bewege",15)
    Do
    $msg = GUIGetMsg()
    Until $msg = -3
    ;#Beispiel Ende
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Bewege
    ; Description ...: Sets the angle one step higher, sets the transparency down and draws the cake
    ; Syntax.........: _Load_Bewege()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func Load_Bewege()
    $startangle += 2
    $angle = Mod($angle + 3, 360)
    $r = 1 + Floor($angle / 24)
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, $w, $h, $brushWeiss)
    _GDIPlus_GraphicsFillPie($buffer, 0, 0, $w, $h, $startangle, $angle, $brush[$r])
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, $w, $h)
    _WinAPI_UpdateLayeredWindow($hWnd, ;<==HILFE!!!###########################################################
    EndFunc
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Startup
    ; Description ...: Initialises variables and GDI+ resources
    ; Syntax.........: _Load_Startup()
    ; Parameters ....: $hWnd - Handle to the window
    ; $width - Width of the window
    ; $height - Height of the window
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func Load_Startup($handle,$width,$height)
    $hWnd = $handle
    $w = $width
    $h = $height
    $angle = 1
    $r = 1
    $startangle = 0
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    For $i = 0 To 14
    $brush[$i + 1] = _GDIPlus_BrushCreateSolid("0x" & Hex(0xFF - $i * 0x11, 2) & "66CCFF")
    Next
    $graphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics($w, $h, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($buffer, 2)
    EndFunc
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Shutdown
    ; Description ...: Cleans up resources
    ; Syntax.........: _Load_Shutdown()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func Load_Shutdown()
    For $i = 1 To 15
    _GDIPlus_BrushDispose($brush[$i])
    Next
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]
  • UDF erstellen

    • DFPWare
    • 1. Mai 2011 um 18:28

    Gute Idee, mal gucken ob ich das selber hinbekomme ;)

    Gib mir mal nen Denkanstoß:D z.B wie ich den Hintergrund der Gui transparent bekommen oO

    DFPWare

  • If Transparent then ?!

    • DFPWare
    • 1. Mai 2011 um 13:29

    Oder so

    [autoit]

    If $trans <= 230 Then
    $trans = 255
    WinSetTrans($Form1, "", $trans)
    Else
    $trans = 230
    WinSetTrans($Form1, "", $trans)
    EndIf

    [/autoit]
  • If Transparent then ?!

    • DFPWare
    • 1. Mai 2011 um 13:26

    Du musst die Transparenz als Zahl in einer Variable speichern, z.B $trans und dann halt abfragen, ob $trans <= 230 ist und dann halt auf 255 setzen

    DFPWare

  • UDF erstellen

    • DFPWare
    • 1. Mai 2011 um 13:15

    Hier mal eine ausführliche Variante von Lade2, wäre das okay so?

    Spoiler anzeigen
    [autoit]

    ;Lade2
    #include <GDIPlus.au3>
    Global $iW, $iH, $iD, $aX[16], $aBrush[16], $brushWeiss, $graphic, $bitmap, $buffer

    [/autoit] [autoit][/autoit] [autoit]

    ;#Beispiel Start
    OnAutoItExitRegister("_Load_Shutdown")
    $gui = GUICreate("", 400, 50)
    _Load_Startup($gui, 400, 50, 20)
    GUISetState()
    AdlibRegister("_Load_Bewege", 10)
    Do
    $msg = GUIGetMsg()
    _Load_Zeichne()
    Until $msg = -3
    ;#Beispiel Ende
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Bewege
    ; Description ...: Moves the Beam one step to the right
    ; Syntax.........: _Load_Bewege()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func _Load_Bewege()
    For $n = 1 To 15 Step 1
    If $aX[$n] < $iW Then $aX[$n] += 2
    If $aX[$n] >= $iW Then $aX[$n] = 0
    Next
    EndFunc ;==>_Load_Bewege
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Shutdown
    ; Description ...: Cleans up resources
    ; Syntax.........: _Load_Shutdown()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func _Load_Shutdown()
    For $m = 1 To 15 Step 1
    _GDIPlus_BrushDispose($aBrush[$m])
    Next
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc ;==>_Load_Shutdown
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Startup
    ; Description ...: Initialises variables and GDI+ resources
    ; Syntax.........: _Load_Startup()
    ; Parameters ....: $hWnd - Handle to the window
    ; $width - Width of the window
    ; $height - Height of the window
    ; $durchmesser - Diameter of the window
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func _Load_Startup($hWnd, $width, $height, $durchmesser)
    $iW = $width
    $iH = $height
    $iD = $durchmesser
    For $i = 1 To 15 Step 1
    $aX[$i] = 10 - (($i - 1) * 10)
    Next
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    For $j = 0 To 14 Step 1
    $aBrush[$j + 1] = _GDIPlus_BrushCreateSolid("0x" & Hex(0xFF - $j * 0x11, 2) & "60CCFF")
    Next
    $graphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    EndFunc ;==>_Load_Startup
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Zeichne
    ; Description ...: Draws the Beam
    ; Syntax.........: _Load_Zeichne()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func _Load_Zeichne()
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, $iW, $iH, $brushWeiss)
    For $o = 1 To 15 Step 1
    _GDIPlus_GraphicsFillEllipse($buffer, $aX[$o], ($iH - $iD) / 2, $iD, $iD, $aBrush[$o])
    Next
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 20, $iH, $brushWeiss)
    _GDIPlus_GraphicsFillRect($buffer, $iW - 20, 0, 20, $iH, $brushWeiss)
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, $iW, $iH)
    EndFunc ;==>_Load_Zeichne

    [/autoit]

    Und hier das Selbe für Lade3

    Spoiler anzeigen
    [autoit]

    ;Lade3
    #include <GDIPlus.au3>
    Global $w,$h,$angle,$r,$startangle,$brush[16],$brushWeiss,$graphic,$bitmap,$buffer
    ;#Beispiel Start
    OnAutoItExitRegister("Load_shutdown")
    $gui = GUICreate("GUI",300,300)
    Load_startup($gui,300,300)
    GUISetState()
    AdlibRegister("Load_bewege",15)
    Do
    $msg = GUIGetMsg()
    Until $msg = -3
    ;#Beispiel Ende
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Bewege
    ; Description ...: Sets the angle one step higher, sets the transparency down and draws the cake
    ; Syntax.........: _Load_Bewege()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func Load_Bewege()
    $startangle += 2
    $angle = Mod($angle + 3, 360)
    $r = 1 + Floor($angle / 24)
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, $w, $h, $brushWeiss)
    _GDIPlus_GraphicsFillPie($buffer, 0, 0, $w, $h, $startangle, $angle, $brush[$r])
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, $w, $h)
    EndFunc
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Startup
    ; Description ...: Initialises variables and GDI+ resources
    ; Syntax.........: _Load_Startup()
    ; Parameters ....: $hWnd - Handle to the window
    ; $width - Width of the window
    ; $height - Height of the window
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func Load_Startup($hWnd,$width,$height)
    $w = $width
    $h = $height
    $angle = 1
    $r = 1
    $startangle = 0
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    For $i = 0 To 14
    $brush[$i + 1] = _GDIPlus_BrushCreateSolid("0x" & Hex(0xFF - $i * 0x11, 2) & "66CCFF")
    Next
    $graphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics($w, $h, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($buffer, 2)
    EndFunc
    ; #FUNCTION# ;===============================================================================;
    ; Name...........: _Load_Shutdown
    ; Description ...: Cleans up resources
    ; Syntax.........: _Load_Shutdown()
    ; Author ........: DFPWare
    ; Example .......; Yes
    ;; ;==========================================================================================
    Func Load_Shutdown()
    For $i = 1 To 15
    _GDIPlus_BrushDispose($brush[$i])
    Next
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]
  • UDF erstellen

    • DFPWare
    • 1. Mai 2011 um 12:20

    Okay ich sehs mir nach dem mittag mal an, ja dass Lade2 weiß bleibt weiß ich auch aber ich weiß nich warum.*höhö Wortspiel :D*

    DFPWare

  • UDF erstellen

    • DFPWare
    • 1. Mai 2011 um 11:47

    Hallo Leute

    aufgrund von name22's Idee eine UDF hier für zu machen, hab ich es mal für Lade 2 und 3 ausprobiert, jedoch bekomme ich zahlreiche WARNING's wenn ich das script ausführe und Lade2 klappt gar nicht

    Lade2:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    OnAutoItExitRegister("_Lade_Shutdown")
    $gui = GUICreate("",400,50)
    _Lade_Startup($gui,400,50,20)
    GUISetState()
    AdlibRegister("_Lade_Bewege",10)
    Do
    $msg = GUIGetMsg()
    _Lade_Zeichne()
    Until $msg = -3
    Func _Lade_Startup($hWnd,$width,$height,$durchmesser)
    Global $w = $width
    Global $h = $height
    Global $d = $durchmesser
    Global $x[16]
    Global $brush[16]
    For $i=1 To 15 Step 1
    $x[$i] = 10-(($i-1)*10)
    Next
    _GDIPlus_Startup()
    Global $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    For $j = 0 To 14 Step 1
    $brush[$j+1] = _GDIPlus_BrushCreateSolid("0x" & Hex(0xFF - $j * 0x11, 2) & "60CCFF")
    Next
    Global $graphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Global $bitmap = _GDIPlus_BitmapCreateFromGraphics($w, $h, $graphic)
    Global $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Lade_Shutdown()
    For $m = 1 To 15 Step 1
    _GDIPlus_BrushDispose($brush[$m])
    Next
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Lade_Bewege()
    For $n = 1 To 15 Step 1
    If $x[$n] < $w Then $x[$n] += 2
    If $x[$n] >= $w Then $x[$n] = 0
    Next
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Lade_Zeichne()
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, $w, $h, $brushWeiss)
    For $o = 1 To 15 Step 1
    _GDIPlus_GraphicsFillEllipse($buffer,$x[$o],($w-$d)/2,$d,$d,$brush[$o])
    Next
    _GDIPlus_GraphicsFillRect($buffer,0,0,20,$h,$brushWeiss)
    _GDIPlus_GraphicsFillRect($buffer,$w-40,0,20,$h,$brushWeiss)
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, $w, $h)
    EndFunc

    [/autoit]

    und Lade3:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    OnAutoItExitRegister("Lade_shutdown")
    $gui = GUICreate("GUI",100,100)
    Lade_startup($gui,100,100)
    GUISetState()
    AdlibRegister("Lade_bewege",15)
    Do
    $msg = GUIGetMsg()
    Until $msg = -3

    [/autoit] [autoit][/autoit] [autoit]

    Func Lade_bewege()
    $startangle += 2
    $angle = Mod($angle + 3, 360)
    $r = 1 + Floor($angle / 24)
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, $w, $h, $brushWeiss)
    _GDIPlus_GraphicsFillPie($buffer, 0, 0, $w, $h, $startangle, $angle, $brush[$r])
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, $w, $h)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Lade_startup($hWnd,$width,$height)
    Global $w = $width
    Global $h = $height
    Global $angle = 1
    Global $r = 1
    Global $startangle = 0
    Global $brush[16]
    _GDIPlus_Startup()
    Global $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    For $i = 0 To 14
    $brush[$i + 1] = _GDIPlus_BrushCreateSolid("0x" & Hex(0xFF - $i * 0x11, 2) & "66CCFF")
    Next
    Global $graphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Global $bitmap = _GDIPlus_BitmapCreateFromGraphics($w, $h, $graphic)
    Global $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($buffer, 2)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Lade_shutdown()
    For $i = 1 To 15
    _GDIPlus_BrushDispose($brush[$i])
    Next
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]

    Ich hoffe ihr könnt mir ein paar Tips geben, wie ich das verbessern kann.

    Danke
    DFPWare

  • Virenschutz für Linux

    • DFPWare
    • 30. April 2011 um 19:57

    Eigentlich sagt man doch, dass man keinen braucht, weil sich eh keiner die Mühe macht für Linux nen Virus zu schreiben

    DFPWare

  • GDI+ Animationen

    • DFPWare
    • 30. April 2011 um 18:51

    Wieso ist doch nicht schlecht ;)

    Ich hab das ja auch nur aus Langeweile gemacht und vielleicht hilft es dem einen oder anderen, der GDI+ noch nicht beherrscht, obwohl ich es eigentlich auch nimcht beherrsche, ich hab...sagen wir Grundkenntnisse;)

    DFPWare


    EDIT: Ich hab jetzt die UDF, wenn man das so nennen will mal Beispielhaft für Lade3 gemacht um zu gucken ob das so okay ist, die Kommentare kommen noch ;)

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    OnAutoItExitRegister("Lade_shutdown")
    $gui = GUICreate("GUI",100,100)
    Lade_startup($gui,100,100)
    GUISetState()
    AdlibRegister("Lade_bewege",15)
    Do
    $msg = GUIGetMsg()
    Until $msg = -3

    [/autoit] [autoit][/autoit] [autoit]

    Func Lade_bewege()
    $startangle += 2
    $angle = Mod($angle + 3, 360)
    $r = 1 + Floor($angle / 24)
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, $w, $h, $brushWeiss)
    _GDIPlus_GraphicsFillPie($buffer, 0, 0, $w, $h, $startangle, $angle, $brush[$r])
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, $w, $h)
    EndFunc
    Func Lade_startup($hWnd,$width,$height)
    Global $w = $width
    Global $h = $height
    Global $angle = 1
    Global $r = 1
    Global $startangle = 0
    Global $brush[16]
    _GDIPlus_Startup()
    Global $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    For $i = 0 To 14
    $brush[$i + 1] = _GDIPlus_BrushCreateSolid("0x" & Hex(0xFF - $i * 0x11, 2) & "66CCFF")
    Next
    Global $graphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
    Global $bitmap = _GDIPlus_BitmapCreateFromGraphics($w, $h, $graphic)
    Global $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($buffer, 2)
    EndFunc
    Func Lade_shutdown()
    For $i = 1 To 15
    _GDIPlus_BrushDispose($brush[$i])
    Next
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc

    [/autoit]

    Ich hoffe ihr könnt mir noch sagen was ich verbessern kann, weil wenn man es ausführt bekommt man eine Reihe von Warnings, obwohl es funktioniert ;)

  • GDI+ Animationen

    • DFPWare
    • 30. April 2011 um 15:22

    Dachte mir schon dass man das noch kürzen kann, aber ich wusste nicht wie, danke ;)

    DFPWare

  • GDI+ Animationen

    • DFPWare
    • 30. April 2011 um 13:45

    Ja werd ich morgen mal ausprobieren;) Gute Idee

  • GDI+ Animationen

    • DFPWare
    • 30. April 2011 um 13:41

    Etwa so?:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    $angle = 1
    $r = 1
    $startangle = 0
    Dim $brush[16]
    OnAutoItExitRegister("_EXIT")
    AdlibRegister("_bewege",15)
    $Gui = GUICreate("",100,100)
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    $brush[1] = _GDIPlus_BrushCreateSolid(0xFF66CCFF)
    $brush[2] = _GDIPlus_BrushCreateSolid(0xEE66CCFF)
    $brush[3] = _GDIPlus_BrushCreateSolid(0xDD66CCFF)
    $brush[4] = _GDIPlus_BrushCreateSolid(0xCC66CCFF)
    $brush[5] = _GDIPlus_BrushCreateSolid(0xBB66CCFF)
    $brush[6] = _GDIPlus_BrushCreateSolid(0xAA66CCFF)
    $brush[7] = _GDIPlus_BrushCreateSolid(0x9966CCFF)
    $brush[8] = _GDIPlus_BrushCreateSolid(0x8866CCFF)
    $brush[9] = _GDIPlus_BrushCreateSolid(0x7766CCFF)
    $brush[10] = _GDIPlus_BrushCreateSolid(0x6666CCFF)
    $brush[11] = _GDIPlus_BrushCreateSolid(0x5566CCFF)
    $brush[12] = _GDIPlus_BrushCreateSolid(0x4466CCFF)
    $brush[13] = _GDIPlus_BrushCreateSolid(0x3366CCFF)
    $brush[14] = _GDIPlus_BrushCreateSolid(0x2266CCFF)
    $brush[15] = _GDIPlus_BrushCreateSolid(0x1166CCFF)

    [/autoit] [autoit][/autoit] [autoit]

    $graphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(100, 100, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    GUISetState()
    Do
    $msg = GUIGetMsg()
    Until $msg = -3
    Func _EXIT()
    _GDIPlus_BrushDispose($brush)
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc
    Func _bewege()
    $startangle += 2
    If $angle < 360 Then $angle += 3
    If $angle >= 360 Then $angle = 0
    ;~ ConsoleWrite($angle&@CRLF)
    Select
    Case $angle < 24
    $r = 1
    Case $angle >= 24 And $angle < 48
    $r = 2
    Case $angle >= 48 And $angle < 72
    $r = 3
    Case $angle >= 72 And $angle < 96
    $r = 4
    Case $angle >= 96 And $angle < 120
    $r = 5
    Case $angle >= 120 And $angle < 144
    $r = 6
    Case $angle >= 144 And $angle < 168
    $r = 7
    Case $angle >= 168 And $angle < 192
    $r = 8
    Case $angle >= 192 And $angle < 216
    $r = 9
    Case $angle >= 216 And $angle < 240
    $r = 10
    Case $angle >= 240 And $angle < 264
    $r = 11
    Case $angle >= 264 And $angle < 288
    $r = 12
    Case $angle >= 288 And $angle < 322
    $r = 13
    Case $angle >= 322 And $angle < 346
    $r = 14
    Case $angle >= 346 And $angle < 360
    $r = 15
    EndSelect
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 100, 100, $brushWeiss)
    _GDIPlus_GraphicsFillPie($buffer,0,0,100,100,$startangle,$angle,$brush[$r])
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, 100, 100)
    EndFunc

    [/autoit]
  • GDI+ Animationen

    • DFPWare
    • 30. April 2011 um 13:17

    Hey Leute,

    ich hab mich in den letzten Tagen zum Spaß einfach mal mit ein paar GDI+ Animationen beschäftigt, ist wie gesagt nichts großes, aber vielleicht könnt ihr mir ja was dazu sagen ;)

    Ladebildschirm 1:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    Global $stat = 1
    Global $winkel=0
    Global $x1=Cos($winkel)*40 + 40
    Global $y1=Sin($winkel)*40 + 40
    Global $x11=Cos($winkel-10)*40 + 40
    Global $y11=Sin($winkel-10)*40 + 40
    Global $x12=Cos($winkel-20)*40 + 40
    Global $y12=Sin($winkel-20)*40 + 40
    Global $x2=Cos($winkel+179)*40 + 40
    Global $y2=Sin($winkel+179)*40 + 40
    Global $x21=Cos($winkel+169)*40 + 40
    Global $y21=Sin($winkel+169)*40 + 40
    Global $x22=Cos($winkel+159)*40 + 40
    Global $y22=Sin($winkel+159)*40 + 40
    OnAutoItExitRegister("_EXIT")
    AdlibRegister("_bewege",30)
    AdlibRegister("_loading",100)
    $Gui = GUICreate("",200,100)
    $label = GUICtrlCreateLabel("Loading.",110,80)
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFF0F0F0)
    $brushGruen = _GDIPlus_BrushCreateSolid(0xFF60CCFF)
    $brushGruen1 = _GDIPlus_BrushCreateSolid(0xBB60CCFF)
    $brushGruen2 = _GDIPlus_BrushCreateSolid(0x7760CCFF)
    $graphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(100, 100, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    GUISetState()
    Do
    $msg = GUIGetMsg()
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 100, 100, $brushWeiss)
    _GDIPlus_GraphicsFillEllipse($buffer,$x1,$y1,20,20,$brushGruen)
    _GDIPlus_GraphicsFillEllipse($buffer,$x11+3,$y11+3,14,14,$brushGruen1)
    _GDIPlus_GraphicsFillEllipse($buffer,$x12+5,$y12+5,10,10,$brushGruen2)
    _GDIPlus_GraphicsFillEllipse($buffer,$x2,$y2,20,20,$brushGruen)
    _GDIPlus_GraphicsFillEllipse($buffer,$x21+5,$y21+5,14,14,$brushGruen1)
    _GDIPlus_GraphicsFillEllipse($buffer,$x22+5,$y22+5,10,10,$brushGruen2)
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, 100, 100)
    Until $msg = -3
    Func _EXIT()
    _GDIPlus_BrushDispose($brushGruen)
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc
    Func _bewege()
    If $winkel >= 360 Then $winkel = 0
    $winkel += 0.2
    $x1=Cos($winkel)*40 + 40
    $y1=Sin($winkel)*40 + 40
    $x11=Cos($winkel-10)*40 + 40
    $y11=Sin($winkel-10)*40 + 40
    $x12=Cos($winkel-20)*40 + 40
    $y12=Sin($winkel-20)*40 + 40
    $x2=Cos($winkel+179)*40 + 40
    $y2=Sin($winkel+179)*40 + 40
    $x21=Cos($winkel+169)*40 + 40
    $y21=Sin($winkel+169)*40 + 40
    $x22=Cos($winkel+159)*40 + 40
    $y22=Sin($winkel+159)*40 + 40
    EndFunc
    Func _loading()
    Switch $stat
    Case 1
    GUICtrlSetData($label,"Loading.")
    $stat = 2
    Case 2
    GUICtrlSetData($label,"Loading..")
    $stat = 3
    Case 3
    GUICtrlSetData($label,"Loading...")
    $stat = 1
    EndSwitch
    EndFunc

    [/autoit]

    Ladebildschirm 2:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    $x1 = 10
    $x2 = 0
    $x3 = -10
    $x4 = -20
    $x5 = -30
    $x6 = -40
    $x7 = -50
    $x8 = -60
    $x9 = -70
    $x10 = -80
    $x11 = -90
    $x12 = -100
    $x13 = -110
    $x14 = -120
    $x15 = -130
    OnAutoItExitRegister("_EXIT")
    AdlibRegister("_bewege",10)
    $Gui = GUICreate("",500,50)
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    $brushGruen = _GDIPlus_BrushCreateSolid(0xFF60CCFF)
    $brushGruen1 = _GDIPlus_BrushCreateSolid(0xEE60CCFF)
    $brushGruen2 = _GDIPlus_BrushCreateSolid(0xDD60CCFF)
    $brushGruen3 = _GDIPlus_BrushCreateSolid(0xCC60CCFF)
    $brushGruen4 = _GDIPlus_BrushCreateSolid(0xBB60CCFF)
    $brushGruen5 = _GDIPlus_BrushCreateSolid(0xAA60CCFF)
    $brushGruen6 = _GDIPlus_BrushCreateSolid(0x9960CCFF)
    $brushGruen7 = _GDIPlus_BrushCreateSolid(0x8860CCFF)
    $brushGruen8 = _GDIPlus_BrushCreateSolid(0x7760CCFF)
    $brushGruen9 = _GDIPlus_BrushCreateSolid(0x6660CCFF)
    $brushGruen10 = _GDIPlus_BrushCreateSolid(0x5560CCFF)
    $brushGruen11 = _GDIPlus_BrushCreateSolid(0x4460CCFF)
    $brushGruen12 = _GDIPlus_BrushCreateSolid(0x3360CCFF)
    $brushGruen13 = _GDIPlus_BrushCreateSolid(0x2260CCFF)
    $brushGruen14 = _GDIPlus_BrushCreateSolid(0x1160CCFF)
    $graphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(500, 50, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    GUISetState()
    Do
    $msg = GUIGetMsg()
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 500, 50, $brushWeiss)
    _GDIPlus_GraphicsFillEllipse($buffer,$x1,15,20,20,$brushGruen)
    _GDIPlus_GraphicsFillEllipse($buffer,$x2,15,20,20,$brushGruen1)
    _GDIPlus_GraphicsFillEllipse($buffer,$x3,15,20,20,$brushGruen2)
    _GDIPlus_GraphicsFillEllipse($buffer,$x4,15,20,20,$brushGruen3)
    _GDIPlus_GraphicsFillEllipse($buffer,$x5,15,20,20,$brushGruen4)
    _GDIPlus_GraphicsFillEllipse($buffer,$x6,15,20,20,$brushGruen5)
    _GDIPlus_GraphicsFillEllipse($buffer,$x7,15,20,20,$brushGruen6)
    _GDIPlus_GraphicsFillEllipse($buffer,$x8,15,20,20,$brushGruen7)
    _GDIPlus_GraphicsFillEllipse($buffer,$x9,15,20,20,$brushGruen8)
    _GDIPlus_GraphicsFillEllipse($buffer,$x10,15,20,20,$brushGruen9)
    _GDIPlus_GraphicsFillEllipse($buffer,$x11,15,20,20,$brushGruen10)
    _GDIPlus_GraphicsFillEllipse($buffer,$x12,15,20,20,$brushGruen11)
    _GDIPlus_GraphicsFillEllipse($buffer,$x13,15,20,20,$brushGruen12)
    _GDIPlus_GraphicsFillEllipse($buffer,$x14,15,20,20,$brushGruen13)
    _GDIPlus_GraphicsFillEllipse($buffer,$x15,15,20,20,$brushGruen14)
    _GDIPlus_GraphicsFillRect($buffer,0,0,20,50,$brushWeiss)
    _GDIPlus_GraphicsFillRect($buffer,460,0,20,50,$brushWeiss)
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, 500, 50)
    Until $msg = -3
    Func _EXIT()
    _GDIPlus_BrushDispose($brushGruen)
    _GDIPlus_BrushDispose($brushGruen1)
    _GDIPlus_BrushDispose($brushGruen2)
    _GDIPlus_BrushDispose($brushGruen3)
    _GDIPlus_BrushDispose($brushGruen4)
    _GDIPlus_BrushDispose($brushGruen5)
    _GDIPlus_BrushDispose($brushGruen6)
    _GDIPlus_BrushDispose($brushGruen7)
    _GDIPlus_BrushDispose($brushGruen8)
    _GDIPlus_BrushDispose($brushGruen9)
    _GDIPlus_BrushDispose($brushGruen10)
    _GDIPlus_BrushDispose($brushGruen11)
    _GDIPlus_BrushDispose($brushGruen12)
    _GDIPlus_BrushDispose($brushGruen13)
    _GDIPlus_BrushDispose($brushGruen14)
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc
    Func _bewege()
    If $x1 < 460 Then $x1 += 2
    If $x1 >= 460 Then $x1 = 0
    If $x2 < 460 Then $x2 += 2
    If $x2 >= 460 Then $x2 = 0
    If $x3 < 460 Then $x3 += 2
    If $x3 >= 460 Then $x3 = 0
    If $x4 < 460 Then $x4 += 2
    If $x4 >= 460 Then $x4 = 0
    If $x5 < 460 Then $x5 += 2
    If $x5 >= 460 Then $x5 = 0
    If $x6 < 460 Then $x6 += 2
    If $x6 >= 460 Then $x6 = 0
    If $x7 < 460 Then $x7 += 2
    If $x7 >= 460 Then $x7 = 0
    If $x8 < 460 Then $x8 += 2
    If $x8 >= 460 Then $x8 = 0
    If $x9 < 460 Then $x9 += 2
    If $x9 >= 460 Then $x9 = 0
    If $x10 < 460 Then $x10 += 2
    If $x10 >= 460 Then $x10 = 0
    If $x11 < 460 Then $x11 += 2
    If $x11 >= 460 Then $x11 = 0
    If $x12 < 460 Then $x12 += 2
    If $x12 >= 460 Then $x12 = 0
    If $x13 < 460 Then $x13 += 2
    If $x13 >= 460 Then $x13= 0
    If $x14 < 460 Then $x14 += 2
    If $x14 >= 460 Then $x14 = 0
    If $x15 < 460 Then $x15 += 2
    If $x15 >= 460 Then $x15 = 0
    EndFunc

    [/autoit]

    Und Nummer 3;)

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    $angle = 1
    $r = 1
    $startangle = 0
    Dim $brush[16]
    OnAutoItExitRegister("_EXIT")
    AdlibRegister("_bewege",15)
    $Gui = GUICreate("",100,100)
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    $brush[1] = _GDIPlus_BrushCreateSolid(0xFF66CCFF)
    $brush[2] = _GDIPlus_BrushCreateSolid(0xEE66CCFF)
    $brush[3] = _GDIPlus_BrushCreateSolid(0xDD66CCFF)
    $brush[4] = _GDIPlus_BrushCreateSolid(0xCC66CCFF)
    $brush[5] = _GDIPlus_BrushCreateSolid(0xBB66CCFF)
    $brush[6] = _GDIPlus_BrushCreateSolid(0xAA66CCFF)
    $brush[7] = _GDIPlus_BrushCreateSolid(0x9966CCFF)
    $brush[8] = _GDIPlus_BrushCreateSolid(0x8866CCFF)
    $brush[9] = _GDIPlus_BrushCreateSolid(0x7766CCFF)
    $brush[10] = _GDIPlus_BrushCreateSolid(0x6666CCFF)
    $brush[11] = _GDIPlus_BrushCreateSolid(0x5566CCFF)
    $brush[12] = _GDIPlus_BrushCreateSolid(0x4466CCFF)
    $brush[13] = _GDIPlus_BrushCreateSolid(0x3366CCFF)
    $brush[14] = _GDIPlus_BrushCreateSolid(0x2266CCFF)
    $brush[15] = _GDIPlus_BrushCreateSolid(0x1166CCFF)

    [/autoit] [autoit][/autoit] [autoit]

    $graphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(100, 100, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    GUISetState()
    Do
    $msg = GUIGetMsg()
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 100, 100, $brushWeiss)
    _GDIPlus_GraphicsFillPie($buffer,0,0,100,100,$startangle,$angle,$brush[$r])
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, 100, 100)
    Until $msg = -3
    Func _EXIT()
    _GDIPlus_BrushDispose($brush)
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc
    Func _bewege()
    $startangle += 2
    If $angle < 360 Then $angle += 3
    If $angle >= 360 Then $angle = 0
    ;~ ConsoleWrite($angle&@CRLF)
    Select
    Case $angle < 24
    $r = 1
    Case $angle >= 24 And $angle < 48
    $r = 2
    Case $angle >= 48 And $angle < 72
    $r = 3
    Case $angle >= 72 And $angle < 96
    $r = 4
    Case $angle >= 96 And $angle < 120
    $r = 5
    Case $angle >= 120 And $angle < 144
    $r = 6
    Case $angle >= 144 And $angle < 168
    $r = 7
    Case $angle >= 168 And $angle < 192
    $r = 8
    Case $angle >= 192 And $angle < 216
    $r = 9
    Case $angle >= 216 And $angle < 240
    $r = 10
    Case $angle >= 240 And $angle < 264
    $r = 11
    Case $angle >= 264 And $angle < 288
    $r = 12
    Case $angle >= 288 And $angle < 322
    $r = 13
    Case $angle >= 322 And $angle < 346
    $r = 14
    Case $angle >= 346 And $angle < 360
    $r = 15
    EndSelect
    EndFunc

    [/autoit]

    8:

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    Global $pi = 3.1415926535898
    Global $formel = 1
    Global $winkel1 = 0
    Global $winkel2 = $pi
    Global $x1start=Round(Cos($winkel1)*40 + 40,0)
    Global $y1start=Round(Sin($winkel1)*40 + 40,0)
    Global $x1=$x1start
    Global $y1=$y1start
    OnAutoItExitRegister("_EXIT")
    AdlibRegister("_bewege",10)
    $Gui = GUICreate("",200,100)
    _GDIPlus_Startup()
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFF0F0F0)
    $brushGruen = _GDIPlus_BrushCreateSolid(0xFF60CCFF)
    $graphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(200, 100, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    GUISetState()
    Do
    $msg = GUIGetMsg()
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 200, 100, $brushWeiss)
    _GDIPlus_GraphicsFillEllipse($buffer,$x1,$y1,20,20,$brushGruen)
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, 200, 100)
    Until $msg = -3
    Func _EXIT()
    _GDIPlus_BrushDispose($brushGruen)
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_Shutdown()
    EndFunc
    Func _bewege()
    If $formel=1 Then
    $winkel1 += $pi/30
    $x1=Round(Cos($winkel1)*40 + 40,0)
    $y1=Round(Sin($winkel1)*40 + 40,0)
    Else
    $winkel2 -= $pi/30
    $x1=Round(Cos($winkel2)*40 + 120,0)
    $y1=Round(Sin($winkel2)*40 + 40,0)
    EndIf
    If $x1 = $x1start And $y1 = $y1start Then $formel = $formel*-1
    EndFunc

    [/autoit]

    Regen:

    Spoiler anzeigen
    [autoit]

    #include <GuiConstants.au3>
    #include <GDIPlus.au3>
    #include <Misc.au3>
    Opt("GUIOnEventMode", 1)

    [/autoit] [autoit][/autoit] [autoit]

    $fach = 0
    Dim $gegner[80][2]
    For $j = 0 To UBound($gegner) - 1 Step 1
    $gegner[$j][0] = -100
    Next
    OnAutoItExitRegister("_EXIT")
    $Gui = GUICreate("Regen", 500, 500, 100, 100)
    _GDIPlus_Startup()
    $brushSchwarz = _GDIPlus_BrushCreateSolid(0xFFABCDEF)
    $brushWeiss = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    $graphic = _GDIPlus_GraphicsCreateFromHWND($Gui)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics(500, 500, $graphic)
    $buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    GUISetState()
    AdlibRegister("_gegnerSpawn", 50)
    GUISetOnEvent(-3,"_ExitMode")
    Do
    For $m = 0 To UBound($gegner) - 1 Step 1
    If $gegner[$m][1] >= 480 Then $gegner[$m][1] = 0
    Next
    For $k = 0 To UBound($gegner) - 1 Step 1
    $gegner[$k][1] += 2
    Next
    _GDIPlus_GraphicsFillRect($buffer, 0, 0, 500, 500, $brushWeiss)
    For $i = 0 To UBound($gegner) - 1 Step 1
    _GDIPlus_GraphicsFillEllipse($buffer, $gegner[$i][0], $gegner[$i][1], 20, 20, $brushSchwarz)
    Next
    _GDIPlus_GraphicsDrawImageRect($graphic, $bitmap, 0, 0, 500, 500)
    Until Not 1
    Func _EXIT()
    _GDIPlus_BrushDispose($brushSchwarz)
    _GDIPlus_BrushDispose($brushWeiss)
    _GDIPlus_GraphicsDispose($buffer)
    _GDIPlus_GraphicsDispose($graphic)
    _GDIPlus_Shutdown()
    EndFunc ;==>_EXIT
    Func _gegnerSpawn()
    If $fach <= UBound($gegner) - 2 Then
    $gegner[$fach][0] = Random(0, 480, 1)
    $fach += 1
    $gegner[$fach][1] = 0
    EndIf
    EndFunc ;==>_gegnerSpawn
    Func _ExitMode()
    Exit
    EndFunc

    [/autoit]

    Ich hoffe es gefällt euch

    DFPWare

  • plattformunabhängige Programmiersprachen

    • DFPWare
    • 30. April 2011 um 12:25
    Zitat

    danke, linux is halt das beste os

    deshalb ist es ja auch so weit verbreitet und man findet auch viel mehr freeware als für Windows, und man kann dadrauf auch so gut mit autoIt programmieren und Spiele spielen, weil es ja fast jedes Programm auch für Linux gibt, und jetzt komm mir nicht mit Wine

    Das einzige was daran gut ist, ist dass es schneller ist als Windows

    Das ist meine Meinung, und ich hab mal nen Monat Ubuntu gehabt zum ausprobieren

    DFPWare

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™