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. Ineluki

Beiträge von Ineluki

  • Probleme mit variablen

    • Ineluki
    • 23. Juli 2010 um 18:29

    1. Es kann unmöglich daran liegen, dass du die Vollversion von SciTE hast, denn ich ahb diese ebenfalls und die Version von SciTE hat NICHTS mti dem Code zu tun.
    2. Bitte poste das mal vernünftig und nicht alles in nur 3 Reihen.

  • Probleme mit variablen

    • Ineluki
    • 23. Juli 2010 um 18:14

    Du sollst damit einfach nur prüfen, ob die Case Abfrage überhaupt funktioniert -.-
    Aber der Feher liegt zu 100% bei dir, bei mir funktioniert das hier nämlich:

    Spoiler anzeigen
    [autoit]

    Global $NUMMER=0
    SetColor()
    Func SetColor()
    Opt("MouseCoordMode", 1)
    $X_COORD = MouseGetPos(0)
    $FARBE="ROT"
    Switch $X_COORD
    Case $X_COORD<-352 Or $X_COORD>352
    Sleep(500)
    Case -352 To -260
    $NUMMER = 0
    Case -250 To -158
    $NUMMER = 1
    Case -148 To 56
    $NUMMER = 2
    Case -46 To 46
    $NUMMER = 3
    Case 56 To 148
    $NUMMER = 4
    Case 158 To 250
    $NUMMER = 5
    Case 260 To 352
    $NUMMER = 6
    EndSwitch

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

    MsgBox(0, "", $NUMMER)
    EndFunc

    [/autoit]
  • Probleme mit variablen

    • Ineluki
    • 23. Juli 2010 um 18:06

    Das verstehe ich so, dass du die MsgBox am Ende von Script eingefügt hast, und nicht statt der Wertzuweisung der Variable ;)

  • Probleme mit variablen

    • Ineluki
    • 23. Juli 2010 um 18:01

    Statt der Variable einen Wert zu geben, tu mal eine MsgBox dran, in der der Wert steht. Wenn die richtige MsgBox erscheint, stimmen die Case Abfragen, sonst nicht.

  • Probleme mit variablen

    • Ineluki
    • 23. Juli 2010 um 17:57

    Eigentlich müsste der Wert geändert werden. Sicher, dass die Case Abfragen stimmen?

  • Probleme mit variablen

    • Ineluki
    • 23. Juli 2010 um 17:49

    Script?
    Aber naja:

    [autoit]


    For $x=0 to 5
    $var=5
    Next
    ; $var ist im ganzen Script verfügbar

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

    Func bla()
    For $x=0 to 5
    $var=5
    Next
    EndFunc
    ; $var ist nur in der Funktion verfügbar

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

    Global $var
    Func bla()
    For $x=0 to 5
    $var=5
    Next
    EndFunc
    ; $var ist im gesamten Script verfügbar

    [/autoit]
  • Mein erstes Minigame (mit GDI+) NEU: QuickDraw Version

    • Ineluki
    • 23. Juli 2010 um 14:27

    Danke, habs verbessert

  • Mein erstes Minigame (mit GDI+) NEU: QuickDraw Version

    • Ineluki
    • 23. Juli 2010 um 14:10
    Zitat von PrideRage

    Schönes game.
    Ich finds ne sehr gut gelungene Ping Pong umsetzung.
    4 Bricks machen mehr spaß als 2 :)
    Jedoch wird eine seitliche- bzw. eckkollision mit einem Brick nicht erkannt.
    MfG. PrideRage


    Werd mal gucken, was ich machen kann.

    Zitat von cinema

    Es laggt und der Creditbutton geht nicht. Sonst, naja... Die Farben und so sind langweilig. Mal doch nen BG


    Credits kommen ganz am Ende xD die sind unwichtig.
    Wenn ich Items mit eingefügt hab, mach ich ein Optionsmenu, dort wird man die Farben auswählen können. Evtl. füg ich auch noch hinzu, dass man statt Farben ein Bild nehmen kann.

    Danke für die Kritik

  • Mein erstes Minigame (mit GDI+) NEU: QuickDraw Version

    • Ineluki
    • 23. Juli 2010 um 13:58

    Hier ist mein erstes Minigame mit GDI+:

    Spoiler anzeigen
    [autoit]

    #RequireAdmin
    #Region includes
    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <Sound.au3>
    #EndRegion
    #Region Globale Variablen und Einstellungen
    OnAutoItExitRegister("dispose")
    Opt("GUICloseOnESC", 0)
    Global $xl=25, $yl=70, $xt=70, $yt=25, $xr=460, $yr=70, $xb=70, $yb=460, $score=0, $ballpos[2]=[250, 250], $delaybmove=IniRead("data/config.ini", "Other", "BSpeed", 50), $varx=5, $vary=3, $game=true, $drawbonusmalus=false, $xbonus, $ybonus, $GameBG=IniRead("data/config.ini", "Colors", "Game Background", "0xFF000000"), $pxb=IniRead("data/config.ini", "Other", "pxb", 5)
    Const $vWidth=10, $vHeight=50, $hWidth=50, $hHeight=10, $ly=20, $lx=20, $lwidth=455, $lheight=455
    $hits=StringRegExp(FileRead("data/config.ini"), "(.*)\nKollisionsound=(.*)", 3)
    If IsArray($hits) Then $hits=StringReplace($hits[1], @CR, "")
    $hits=_SoundOpen($hits)
    If @error Then $hits=_SoundOpen("data/sfx/hit.wav")
    #EndRegion
    #Region GDI+
    _GDIPlus_Startup()
    $LeftBrickPen=_GDIPlus_PenCreate(IniRead("data/config.ini", "Colors", "Left Brick Color", "0xFFFFFFFF"), 4)
    $LeftBrickBrush=_GDIPlus_BrushCreateSolid(IniRead("data/config.ini", "Colors", "Left Brick Color", "0xFFFFFFFF"))
    $TopBrickPen=_GDIPlus_PenCreate(IniRead("data/config.ini", "Colors", "Top Brick Color", "0xFFFFFFFF"), 4)
    $TopBrickBrush=_GDIPlus_BrushCreateSolid(IniRead("data/config.ini", "Colors", "Top Brick Color", "0xFFFFFFFF"))
    $RightBrickPen=_GDIPlus_PenCreate(IniRead("data/config.ini", "Colors", "Right Brick Color", "0xFFFFFFFF"), 4)
    $RightBrickBrush=_GDIPlus_BrushCreateSolid(IniRead("data/config.ini", "Colors", "Right Brick Color", "0xFFFFFFFF"))
    $BottomBrickPen=_GDIPlus_PenCreate(IniRead("data/config.ini", "Colors", "Bottom Brick Color", "0xFFFFFFFF"), 4)
    $BottomBrickBrush=_GDIPlus_BrushCreateSolid(IniRead("data/config.ini", "Colors", "Bottom Brick Color", "0xFFFFFFFF"))
    $LinePen=_GDIPlus_PenCreate(IniRead("data/config.ini", "Colors", "Line Color", "0xFFFF0000"), 2)
    $sFormat = _GDIPlus_StringFormatCreate()
    $sBrush = _GDIPlus_BrushCreateSolid(0xFFFFFF00)
    $sFamily = _GDIPlus_FontFamilyCreate("Courier New")
    $sFont = _GDIPlus_FontCreate($sFamily, 10)
    $sLayout = _GDIPlus_RectFCreate(5, 5)
    $BallPen=_GDIPlus_PenCreate(IniRead("data/config.ini", "Colors", "Ball Color", 0xFFFFFFFF))
    $BallBrush=_GDIPlus_BrushCreateSolid(IniRead("data/config.ini", "Colors", "Ball Color", 0xFFFFFFFF))
    $bonus=_GDIPlus_ImageLoadFromFile("data/images/bonus.jpg")
    $malus=_GDIPlus_ImageLoadFromFile("data/images/malus.jpg")
    #EndRegion
    While 1
    #Region Hauptmenü
    $sGUI = GUICreate("", 343, 213, -1, -1, 0x80000000+0x00800000)
    GUISetFont(20, 800, 2, "Courier New")
    GUICtrlSetDefColor(IniRead("data\config.ini", "Colors", "FontColor", "0xFFFF00"))
    GUISetBkColor(IniRead("data/config.ini", "Colors", "Menu Background", "0x000000"))
    $start = GUICtrlCreateLabel("Starten", 104, 8, 116, 35)
    $credits = GUICtrlCreateLabel("Credits", 104, 132, 116, 35)
    $exit = GUICtrlCreateLabel("Beenden", 104, 169, 116, 35)
    $options = GUICtrlCreateLabel("Optionen", 104, 89, 140, 35)
    $highscore = GUICtrlCreateLabel("Highscore", 104, 48, 164, 35)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3, $exit
    Exit
    Case $start
    GUIDelete($sGUI)
    ExitLoop
    Case $highscore
    MsgBox(64, "Fehler", "Diese Funktion ist noch nicht verfügbar")
    Case $options
    $oGUI = GUICreate("Optionen", 222, 187, -1, -1, 0x80000000+0x00800000)
    GUICtrlSetDefColor(0xFFFF00)
    GUISetFont(14, 400, 2, "Courier New")
    GUISetBkColor(0x000000)
    $coloro=GUICtrlCreateLabel("Farben", 64, 24, 70, 25)
    $audioo=GUICtrlCreateLabel("Audio", 64, 80, 59, 25)
    $controlo=GUICtrlCreateLabel("Steuerung", 64, 136, 103, 25)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case $coloro
    $cGUI = GUICreate("Farben", 248, 515, 192, 124)
    GUICtrlSetDefColor(0xFFFF00)
    GUISetFont(11, 400, 0, "Courier New")
    GUISetBkColor(0x000000)
    GUICtrlCreateLabel("Schriftfarbe", 16, 16, 112, 21)
    $choosefontcolor = GUICtrlCreateButton("", 152, 14, 25, 25)
    GUICtrlCreateLabel("Hintergrundfarben:", 16, 64, 166, 21)
    GUICtrlCreateLabel("Startmenü", 64, 96, 85, 21)
    $choosemenubg = GUICtrlCreateButton("", 176, 94, 25, 25)
    GUICtrlCreateLabel("Spiel", 64, 136, 49, 21)
    $choosegamebg = GUICtrlCreateButton("", 176, 134, 25, 25)
    GUICtrlCreateLabel("Brickfarben:", 16, 184, 112, 21)
    GUICtrlCreateLabel("Links", 64, 216, 49, 21)
    $chooseleftbrick = GUICtrlCreateButton("", 176, 214, 25, 25)
    GUICtrlCreateLabel("Oben", 64, 256, 40, 21)
    $choosetopbrick = GUICtrlCreateButton("", 176, 254, 25, 25)
    GUICtrlCreateLabel("Rechts", 64, 296, 58, 21)
    $chooserightbrick = GUICtrlCreateButton("", 176, 294, 25, 25)
    GUICtrlCreateLabel("Unten", 64, 336, 49, 21)
    $choosebottombrick = GUICtrlCreateButton("", 176, 334, 25, 25)
    GUICtrlCreateLabel("Randfarbe", 16, 384, 85, 21)
    $chooselinecolor = GUICtrlCreateButton("", 152, 382, 25, 25)
    GUICtrlCreateLabel("Ballfarbe", 16, 430, 85, 21)
    $chooseballcolor = GUICtrlCreateButton("", 152, 424, 25, 25)
    $save = GUICtrlCreateButton("Speichern", 112, 480, 91, 25)
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($cGUI)
    ExitLoop
    Case $choosefontcolor
    $nfontcolor=_ChooseColor(2)
    GUICtrlSetBkColor($choosefontcolor, $nfontcolor)
    Case $choosemenubg
    $nmenubg=_ChooseColor(2)
    GUICtrlSetBkColor($choosemenubg, $nmenubg)
    Case $choosegamebg
    $ngamebg=_ChooseColor(2)
    GUICtrlSetBkColor($choosegamebg, $ngamebg)
    $0x=StringLeft($ngamebg, 2)
    $rgb=StringRight($ngamebg, 6)
    $ngamebg=$0x&"FF"&$rgb
    Case $chooseleftbrick
    $nleftbrick=_ChooseColor(2)
    GUICtrlSetBkColor($chooseleftbrick, $nleftbrick)
    $0x=StringLeft($nleftbrick, 2)
    $rgb=StringRight($nleftbrick, 6)
    $nleftbrick=$0x&"FF"&$rgb
    Case $choosetopbrick
    $ntopbrick=_ChooseColor(2)
    GUICtrlSetBkColor($choosetopbrick, $ntopbrick)
    $0x=StringLeft($ntopbrick, 2)
    $rgb=StringRight($ntopbrick, 6)
    $ntopbrick=$0x&"FF"&$rgb
    Case $chooserightbrick
    $nrightbrick=_ChooseColor(2)
    GUICtrlSetBkColor($chooserightbrick, $nrightbrick)
    $0x=StringLeft($nrightbrick, 2)
    $rgb=StringRight($nrightbrick, 6)
    $nrightbrick=$0x&"FF"&$rgb
    Case $choosebottombrick
    $nbottombrick=_ChooseColor(2)
    GUICtrlSetBkColor($choosebottombrick, $nbottombrick)
    $0x=StringLeft($nbottombrick, 2)
    $rgb=StringRight($nbottombrick, 6)
    $nbottombrick=$0x&"FF"&$rgb
    Case $chooselinecolor
    $nlinecolor=_ChooseColor(2)
    GUICtrlSetBkColor($chooselinecolor, $nlinecolor)
    $0x=StringLeft($nlinecolor, 2)
    $rgb=StringRight($nlinecolor, 6)
    $nlinecolor=$0x&"FF"&$rgb
    Case $chooseballcolor
    $nballcolor=_ChooseColor(2)
    GUICtrlSetBkColor($chooselinecolor, $nballcolor)
    $0x=StringLeft($nballcolor, 2)
    $rgb=StringRight($nballcolor, 6)
    $nballcolor=$0x&"FF"&$rgb
    Case $save
    If IsDeclared("nfontcolor") Then IniWrite("data/config.ini", "Colors", "FontColor", $nfontcolor)
    If IsDeclared("nmenubg") Then IniWrite("data/config.ini", "Colors", "Menu Background", $nmenubg)
    If IsDeclared("ngamebg") Then IniWrite("data/config.ini", "Colors", "Game Background", $ngamebg)
    If IsDeclared("nleftbrick") Then IniWrite("data/config.ini", "Colors", "Left Brick Color", $nleftbrick)
    If IsDeclared("ntopbrick") Then IniWrite("data/config.ini", "Colors", "Top Brick Color", $ntopbrick)
    If IsDeclared("nrightbrick") Then IniWrite("data/config.ini", "Colors", "Right Brick Color", $nrightbrick)
    If IsDeclared("nbottombrick") Then IniWrite("data/config.ini", "Colors", "Bottom Brick Color", $nbottombrick)
    If IsDeclared("nlinecolor") Then IniWrite("data/config.ini", "Colors", "Line Color", $nlinecolor)
    If IsDeclared("nballcolor") Then IniWrite("data/config.ini", "Colors", "Ball Color", $nballcolor)
    GUIDelete($cGUI)
    ExitLoop
    EndSwitch
    If _IsPressed("1B") Then
    GUIDelete($cGUI)
    ExitLoop
    EndIf
    WEnd
    Case $audioo
    $aGUI = GUICreate("Audio", 342, 175, 192, 124)
    GUISetBkColor(0x000000)
    GUICtrlSetDefColor(0xFFFF00)
    GUISetFont(10, 400, 0, "Courier New")
    GUICtrlCreateLabel("Hintergrundmusik", 16, 16, 132, 20)
    $bgmusic = GUICtrlCreateInput("", 152, 15, 121, 21)
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlCreateLabel("Sounds:", 16, 48, 60, 20)
    GUICtrlCreateLabel("Kollision", 48, 80, 76, 20)
    $kollisionsound = GUICtrlCreateInput("", 152, 79, 121, 21)
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlCreateLabel("Ende", 48, 112, 36, 20)
    $endsound = GUICtrlCreateInput("", 152, 111, 121, 21)
    GUICtrlSetColor(-1, 0x000000)
    $searchbgm = GUICtrlCreateButton("...", 288, 13, 35, 25)
    GUICtrlSetColor(-1, 0x000000)
    $searchsk = GUICtrlCreateButton("...", 288, 77, 35, 25)
    GUICtrlSetColor(-1, 0x000000)
    $searchse = GUICtrlCreateButton("...", 288, 109, 35, 25)
    GUICtrlSetColor(-1, 0x000000)
    $save = GUICtrlCreateButton("Speichern", 56, 144, 75, 25)
    GUICtrlSetColor(-1, 0x000000)
    $standard = GUICtrlCreateButton("Standart", 152, 144, 75, 25)
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($aGUI)
    ExitLoop
    Case $searchbgm
    GUICtrlSetData($bgmusic, FileOpenDialog("Datei auswählen", Default, "Musikdateien (*.mp3;*.wav)"))
    Case $searchsk
    GUICtrlSetData($kollisionsound, FileOpenDialog("Datei auswählen", Default, "Musikdateien (*.mp3;*.wav)"))
    Case $searchse
    GUICtrlSetData($endsound, FileOpenDialog("Datei auswählen", Default, "Musikdateien (*.mp3;*.wav)"))
    Case $save
    If GUICtrlRead($bgmusic)<>"" Then
    If IniRead("data/config.ini", "Audio", "Background Music", "") ="" Then IniWrite("data/config.ini", "Audio", "Background Music", "")
    $bgm=StringRegExpReplace(FileRead("data/config.ini"), "Background Music=.*", "Background Music="&GUICtrlRead($bgmusic))
    FileWrite("data/config.ini", $bgm)
    EndIf
    If GUICtrlRead($kollisionsound)<>"" Then
    If IniRead("data/config.ini", "Audio", "Kollisionsound", "") ="" Then IniWrite("data/config.ini", "Audio", "Kollisionsound", "")
    $kss=StringRegExpReplace(FileRead("data/config.ini"), "Kollisionsound=.*", "Kollisionsound="&GUICtrlRead($kollisionsound))
    FileWrite("data/config.ini", $kss)
    EndIf
    If GUICtrlRead($endsound)<>"" Then
    If IniRead("data/config.ini", "Audio", "End", "") ="" Then IniWrite("data/config.ini", "Audio", "End", "")
    $ends=StringRegExpReplace(FileRead("data/config.ini"), "End=.*", "End="&GUICtrlRead($endsound))
    FileWrite("data/config.ini", $ends)
    EndIf
    GUIDelete($aGUI)
    ExitLoop
    Case $standard
    IniDelete("data/config.ini", "Audio")
    GUIDelete($aGUI)
    ExitLoop
    EndSwitch
    If _IsPressed("1B") Then
    GUIDelete($aGUI)
    ExitLoop
    EndIf
    WEnd
    Case $controlo
    $cGUI = GUICreate("Steuerung", 341, 605, 192, 124)
    GUISetFont(10, 400, 0, "Courier New")
    GUISetBkColor(0x000000)
    GUICtrlCreateLabel("Geschwindigkeit vom Ball", 24, 16, 196, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $bspeed = GUICtrlCreateInput(IniRead("data/config.ini", "Other", "BSpeed", "50"), 256, 14, 41, 24, 0x2000)
    $Ud1 = GUICtrlCreateUpdown($bspeed)
    GUICtrlSetLimit($bspeed, 2)
    GUICtrlSetLimit($ud1, 99)
    GUICtrlCreateLabel("Pixelbewegung vom Brick", 24, 56, 188, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $pxp = GUICtrlCreateInput(IniRead("data/config.ini", "Other", "pxb", "5"), 256, 54, 41, 24, 0x2000)
    $Ud2 = GUICtrlCreateUpdown($pxp)
    GUICtrlSetLimit($pxp, 2)
    GUICtrlSetLimit($ud2, 20)
    GUICtrlCreateLabel("Linker Brick", 24, 96, 100, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hklt = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkltn", "W"), 96, 128, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hklb = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hklbn", "S"), 96, 152, 284, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUICtrlCreateLabel("Oberer Brick", 24, 192, 100, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hktl = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hktln", "A"), 96, 232, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hktr = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hktrn", "D"), 96, 264, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUICtrlCreateLabel("Rechter Brick", 24, 312, 108, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkrt = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkrtn", "Up Arrow"), 88, 352, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkrb = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkrbn", "Down Arrow"), 88, 392, 316, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUICtrlCreateLabel("Unterer Block", 24, 440, 108, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkul = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkuln", "Left Arrow"), 88, 480, 308, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkur = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkurn", "Right Arrow"), 88, 520, 316, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $Save = GUICtrlCreateButton("Speichern", 40, 568, 75, 25)
    $standard = GUICtrlCreateButton("Standart", 192, 568, 75, 25)
    GUISetState(@SW_SHOW)
    Local $hotkeylt, $hotkeylb, $hotkeytl, $hotkeytr, $hotkeyrt, $hotkeyrb, $hotkeyur, $hotkeyul
    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($cGUI)
    ExitLoop
    Case $save
    IniWrite("data/config.ini", "Other", "BSpeed", GUICtrlRead($bspeed))
    IniWrite("data/config.ini", "Other", "pxb", GUICtrlRead($pxp))
    If IsArray($hotkeylt) Then IniWrite("data/config.ini", "Tastenbelegung", "hkltn", $hotkeylt[2])
    If IsArray($hotkeylt) Then IniWrite("data/config.ini", "Tastenbelegung", "hklt", $hotkeylt[0])
    If IsArray($hotkeylb) Then IniWrite("data/config.ini", "Tastenbelegung", "hklbn", $hotkeylb[2])
    If IsArray($hotkeylb) Then IniWrite("data/config.ini", "Tastenbelegung", "hklb", $hotkeylb[0])
    If IsArray($hotkeytl) Then IniWrite("data/config.ini", "Tastenbelegung", "hktln", $hotkeytl[2])
    If IsArray($hotkeytl) Then IniWrite("data/config.ini", "Tastenbelegung", "hktl", $hotkeytl[0])
    If IsArray($hotkeytr) Then IniWrite("data/config.ini", "Tastenbelegung", "hktrn", $hotkeytr[2])
    If IsArray($hotkeytr) Then IniWrite("data/config.ini", "Tastenbelegung", "hktr", $hotkeytr[0])
    If IsArray($hotkeyrt) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrtn", $hotkeyrt[2])
    If IsArray($hotkeyrt) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrt", $hotkeyrt[0])
    If IsArray($hotkeyrb) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrbn", $hotkeyrb[2])
    If IsArray($hotkeyrb) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrb", $hotkeyrb[0])
    If IsArray($hotkeyur) Then IniWrite("data/config.ini", "Tastenbelegung", "hkurn", $hotkeyur[2])
    If IsArray($hotkeyur) Then IniWrite("data/config.ini", "Tastenbelegung", "hkur", $hotkeyur[0])
    If IsArray($hotkeyul) Then IniWrite("data/config.ini", "Tastenbelegung", "hkuln", $hotkeyul[2])
    If IsArray($hotkeyul) Then IniWrite("data/config.ini", "Tastenbelegung", "hkul", $hotkeyul[0])
    GUIDelete($cGUI)
    ExitLoop
    Case $standard
    IniDelete("data/config.ini", "Other")
    IniDelete("data/config.ini", "Tastenbelegung")
    Case $hklt
    GUICtrlSetData($hklt, "Taste drücken...")
    GUICtrlSetState($hklt, 256)
    While sleep(10)
    $hotkeylt=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hklt, $hotkeylt[2])
    Case $hklb
    GUICtrlSetData($hklb, "Taste drücken...")
    GUICtrlSetState($hklb, 256)
    While sleep(10)
    $hotkeylb=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hklb, $hotkeylb[2])
    Case $hktl
    GUICtrlSetData($hktl, "Taste drücken...")
    GUICtrlSetState($hktl, 256)
    While sleep(10)
    $hotkeytl=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hktl, $hotkeytl[2])
    Case $hktr
    GUICtrlSetData($hktr, "Taste drücken...")
    GUICtrlSetState($hktr, 256)
    While sleep(10)
    $hotkeytr=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hktr, $hotkeytr[2])
    Case $hkrt
    GUICtrlSetData($hkrt, "Taste drücken...")
    GUICtrlSetState($hkrt, 256)
    While sleep(10)
    $hotkeyrt=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkrt, $hotkeyrt[2])
    Case $hkrb
    GUICtrlSetData($hkrb, "Taste drücken...")
    GUICtrlSetState($hkrb, 256)
    While sleep(10)
    $hotkeyrb=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkrb, $hotkeyrb[2])
    Case $hkur
    GUICtrlSetData($hkur, "Taste drücken...")
    GUICtrlSetState($hkur, 256)
    While sleep(10)
    $hotkeyur=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkur, $hotkeyur[2])
    Case $hkul
    GUICtrlSetData($hkul, "Taste drücken...")
    GUICtrlSetState($hkul, 256)
    While sleep(10)
    $hotkeyul=GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkul, $hotkeyul[2])
    EndSwitch
    If GUICtrlRead($pxp)>20 Then GUICtrlSetData($pxp, 20)
    WEnd
    EndSwitch
    If _IsPressed("1B") Then
    GUIDelete($oGUI)
    ExitLoop
    EndIf
    WEnd
    Case $credits
    MsgBox(64, "Fehler", "Diese Funktion ist noch nicht verfügbar")
    EndSwitch
    WEnd
    #EndRegion
    #Region GameGUI
    $game=true
    If IniRead("data/config.ini", "Audio", "Background Music", "") <>"" Then
    $bgmpath=StringRegExp(FileRead("data/config.ini"), "(.*)\nBackground Music=(.*)", 3)

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

    If IsArray($bgmpath) Then $bgmpath=StringReplace($bgmpath[1], @CR, "")
    $musictime=_SoundLength($bgmpath, 2)
    Else
    $musictime=100000000000000
    EndIf
    $hGUI = GUICreate("Minigame", 500, 500, -1, -1, 0x80000000+0x00800000)
    GUISetBkColor(0x000000)
    $hGraphics=_GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hBitmap=_GDIPlus_BitmapCreateFromGraphics(500, 500, $hGraphics)
    $hBuffer=_GDIPlus_ImageGetGraphicsContext($hBitmap)
    GUISetState()
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    $Randomtime=Random(30000, 50000, 1)
    $moveballtimer=TimerInit()
    $scoretimer=TimerInit()
    $handletimer=TimerInit()
    $musicpos=TimerInit()
    $timeout=""
    _SoundPlay($bgmpath)
    Local $lt=IniRead("data/config.ini", "Tastenbelegung", "hklt", 57), $lb=IniRead("data/config.ini", "Tastenbelegung", "hklb", 53), $tl=IniRead("data/config.ini", "Tastenbelegung", "hktl", 41), $tr=IniRead("data/config.ini", "Tastenbelegung", "hktr", 44)
    Local $rt=IniRead("data/config.ini", "Tastenbelegung", "hkrt", 26), $rb=IniRead("data/config.ini", "Tastenbelegung", "hkrb", 28), $ur=IniRead("data/config.ini", "Tastenbelegung", "hkur", 27), $ul=IniRead("data/config.ini", "Tastenbelegung", "hkul", 25)

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

    While $game=true
    Switch GUIGetMsg()
    Case -3
    ExitLoop
    EndSwitch
    If _IsPressed("1B") Then ExitLoop
    If _IsPressed($ul) And $xb>25 Then moveblock(4, "l")
    If _IsPressed($ur) And $xb<420 Then moveblock(4, "r")
    If _IsPressed($rt) And $yr>25 Then moveblock(3, "u")
    If _IsPressed($rb) And $yr<420 Then moveblock(3, "d")
    If _IsPressed($tl) And $xt>25 Then moveblock(2, "l")
    If _IsPressed($tr) And $xt<420 Then moveblock(2, "r")
    If _IsPressed($lt) And $yl>25 Then moveblock(1, "u")
    If _IsPressed($lb) And $yl<420 Then moveblock(1, "d")
    If NOT WinActive("Minigame") Then
    Do
    sleep(100)
    Until WinActive("Minigame")
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    EndIf
    If TimerDiff($moveballtimer)>=$delaybmove Then
    moveball()
    $moveballtimer=TimerInit()
    EndIf
    If TimerDiff($scoretimer)>=10000 Then
    $score+=150
    $scoretimer=TimerInit()
    EndIf
    If TimerDiff($handletimer)>=$Randomtime And $drawbonusmalus=false Then
    $type=Random(1, 2, 1)
    If $type=1 Then $handle=$bonus
    If $type=2 Then $handle=$malus
    $Randomtime=Random(30000, 50000, 1)
    $handletimer=TimerInit()
    createrandombonus(Random(50, 430, 1), Random(50, 430, 1))
    $timeout=TimerInit()
    EndIf
    If _RectCollision($xbonus, $yBonus, 20, 20, $ballpos[0], $ballpos[1], 25, 25) And $drawbonusmalus Then
    $Randomtime=Random(30000, 50000, 1)
    $handletimer=TimerInit()
    $drawbonusmalus=False
    If $type=1 Then $score+=Random(50, 500, 1)
    If $type=2 And $score>0 Then $score-=Random(50, 500, 1)
    EndIf
    If TimerDiff($timeout)>=20000 And $drawbonusmalus Then $drawbonusmalus=false
    If TimerDiff($musicpos)>=$musictime+3000 Then
    _SoundPlay($bgmpath)
    $musicpos=TimerInit()
    EndIf
    WEnd
    #EndRegion
    $score=0
    $drawbonusmalus=false
    GUIDelete($hGUI)
    $ballpos[0]=250
    $ballpos[1]=250
    $soundpath=InIRead("data/config.ini", "Audio", "Background Music", "")
    _SoundStop($bgmpath)
    WEnd
    #Region Funktionen
    #Region Zeichnen
    Func createrandombonus($handlex, $handley)
    $xbonus=$handlex
    $ybonus=$handley
    $drawbonusmalus=true
    _GDIPlus_GraphicsDrawImage($hGraphics, $handle, $handlex, $handley)
    EndFunc
    Func drawblocks()
    _GDIPlus_GraphicsClear($hBuffer, $GameBG)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xl, $yl, $vwidth, $vheight, $LeftBrickPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xl, $yl, $vwidth, $vheight, $LeftBrickBrush)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xt, $yt, $hwidth, $hheight, $TopBrickPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xt, $yt, $hwidth, $hheight, $TopBrickBrush)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xr, $yr, $vwidth, $vheight, $RightBrickPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xr, $yr, $vwidth, $vheight, $RightBrickBrush)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xb, $yb, $hwidth, $hheight, $BottomBrickPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xb, $yb, $hwidth, $hheight, $BottomBrickBrush)
    EndFunc
    Func drawball()
    _GDIPlus_GraphicsDrawEllipse($hBuffer, $ballpos[0], $ballpos[1], 20, 20, $BallPen)
    _GDIPlus_GraphicsFillEllipse($hBuffer, $ballpos[0], $ballpos[1], 20, 20, $BallBrush)
    EndFunc
    #EndRegion
    #Region Bewegungen
    Func moveblock($block, $direction)
    Switch $block
    Case 1
    If $direction="u" Then $yl-=$pxb
    If $direction="d" Then $yl+=$pxb
    Case 2
    If $direction="l" Then $xt-=$pxb
    If $direction="r" Then $xt+=$pxb
    Case 3
    If $direction="u" Then $yr-=$pxb
    If $direction="d" Then $yr+=$pxb
    Case 4
    If $direction="l" Then $xb-=$pxb
    If $direction="r" Then $xb+=$pxb
    EndSwitch
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    If $drawbonusmalus Then _GDIPlus_GraphicsDrawImage($hBuffer, $handle, $xBonus, $yBonus)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    _GDIPlus_GraphicsClear($hBuffer, $GameBG)
    EndFunc
    Func moveball()
    If $ballpos[1]>=460 Or $ballpos[1]<=10 Then kill()
    If $ballpos[0]>=460 Or $ballpos[0]<=10 Then kill()
    If _RectCollision($ballpos[0], $ballpos[1], 20, 20, $xl, $yl, 15, 50) Then
    $varx = $varx * (-1)
    _SoundPlay($hits)
    ElseIf _RectCollision($ballpos[0], $ballpos[1], 20, 20, $xr-10, $yr, 10, 50) Then
    $varx = $varx * (-1)
    _SoundPlay($hits)
    ElseIf _RectCollision($ballpos[0], $ballpos[1], 20, 20, $xt, $yt, 50, 15) Then
    $vary = $vary * (-1)
    _SoundPlay($hits)
    ElseIf _RectCollision($ballpos[0], $ballpos[1], 20, 20, $xb, $yb-6, 50, 10) Then
    $vary = $vary * (-1)
    _SoundPlay($hits)
    EndIf
    $ballpos[0]+=$varx
    $ballpos[1]+=$vary
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    If $drawbonusmalus Then _GDIPlus_GraphicsDrawImage($hBuffer, $handle, $xBonus, $yBonus)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    _GDIPlus_GraphicsClear($hBuffer, $GameBG)
    EndFunc
    #EndRegion
    Func kill()
    SoundPlay(IniRead("data/config.ini", "Audio", "End", "data/sfx/loose.wav"))
    MsgBox(64, "Verloren", "Du hast mit "&$score&" Punkten verloren")
    $game=false
    EndFunc
    Func dispose()
    _GDIPlus_FontDispose($sFont)
    _GDIPlus_FontFamilyDispose($sFamily)
    _GDIPlus_StringFormatDispose($sFormat)
    _GDIPlus_BrushDispose($sBrush)
    _GDIPlus_BrushDispose($BallBrush)
    _GDIPlus_BrushDispose($LeftBrickBrush)
    _GDIPlus_BrushDispose($TopBrickBrush)
    _GDIPlus_BrushDispose($RightBrickBrush)
    _GDIPlus_BrushDispose($BottomBrickBrush)
    _GDIPlus_PenDispose($LeftBrickPen)
    _GDIPlus_PenDispose($TopBrickPen)
    _GDIPlus_PenDispose($RightBrickPen)
    _GDIPlus_PenDispose($BottomBrickPen)
    _GDIPlus_PenDispose($BallPen)
    _GDIPlus_PenDispose($LinePen)
    If IsDeclared("hGraphics") Then
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_GraphicsDispose($hBuffer)
    _GDIPlus_BitmapDispose($hBitmap)
    EndIf
    _GDIPlus_Shutdown()
    _SoundClose($hits)
    EndFunc
    #EndRegion
    Func _RectCollision($iX1, $iY1, $iWidth1, $iHeight1, $iX2, $iY2, $iWidth2, $iHeight2)
    ;Author: Faweyr
    Return $iX1 + $iWidth1 > $iX2 And $iX1 < $iX2 + $iWidth2 And $iY1 + $iHeight1 > $iY2 And $iY1 < $iY2 + $iHeight2
    EndFunc ;==>_RectCollision
    ; Autor: Faweyr
    ; Function: GetKeyInput($sTime,$sBack)
    ; Parameter: $sTime = Time to wait and check for pressed Keys
    ; $sBack = the kind of Result
    ; 0 = Array[3] = ["_ispressed"-Code , "Send"-Code , Name of Key]
    ; 1 = "_ispressed"-Code
    ; 2 = "Send"-Code
    ; 3 = Name of Key
    ; Includes: <Misc.au3>
    func GetKeyInput($sTime = 5000,$sBack = 0)
    $sTimer = TimerInit()
    $sDll = DllOpen("user32.dll")
    Local $sList[111][3] = [ [08,"{BACKSPACE}","Backspace"], [09,"{TAB}","Tab"], [0&"D","{ENTER}","Enter"], ["A"&0,"{LSHIFT}","Left Shift"], ["A"&1,"{RSHIFT}","Right Shift"], _
    [13,"{Pause}","Pause"], [14,"{CAPSLOCK}","Caps Lock"], [1&"B","{ESC}","Esc"], [20,"{SPACE}","Spacebar"], [21,"{PGUP}","Page Up"], [22,"{PGDN}","Page Down"], [23,"{End}","End"], _
    [24,"{Home}","Home"], [25,"{Left}","Left Arrow"], [26,"{UP}","Up Arrow"], [27,"{Right}","Right Arrow"], [28,"{Down}","Down Arrow"], [12,"{ALT}","Alt"], [5&"C","{RWIN}","Right Windows"], _
    [2&"C","{PRINTSCREEN}","Print Screen"], [2&"D","{INS}","Ins"], [2&"E","{DELETE}","Del"], [30,0,"0"], [31,1,"1"], [32,2,"2"], _
    [33,3,"3"], [34,4,"4"], [35,5,"5"], [36,6,"6"], [37,7,"7"], [38,8,"8"], [39,9,"9"], _
    [41,"a","A"], [42,"b","B"], [43,"c","C"], [44,"d","D"], [45,"e","E"], [46,"f","F"], [47,"g","G"], _
    [48,"h","H"], [49,"i","I"], [4&"A","j","J"], [4&"B","k","K"], [4&"C","l","L"], [4&"D","m","M"], [4&"E","n","N"], _
    [4&"F","o","O"], [50,"p","P"], [51,"q","Q"], [52,"r","R"], [53,"s","S"], [54,"t","T"], [55,"u","U"], _
    [56,"v","V"], [57,"w","W"], [58,"x","X"], [59,"y","Y"], [5&"A","z","Z"], [60,"{NUMPAD0}","Keypad 0"], [61,"{NUMPAD1}","Keypad 1"], _
    [62,"{NUMPAD2}","Keypad 2"],[63,"{NUMPAD3}","Keypad 3"], [64,"{NUMPAD4}","Keypad 4"], [65,"{NUMPAD5}","Keypad 5"], [66,"{NUMPAD6}","Keypad 6"], [67,"{NUMPAD7}","Keypad 7"], [68,"{NUMPAD8}","Keypad 8"], _
    [69,"{NUMPAD9}","Keypad 9"],[6&"A","{NUMPADMULT}","Multiply"], [6&"B","{NUMPADADD}","Add"], [6&"C","{NUMPADENTER}","Separator"],[6&"D","{NUMPADSUB}","Subtract"], [6&"E","{NUMPADDOT}","Decimal"], [6&"F","{NUMPADDIV}","Divide"], _
    [70,"{F1}","F1"], [71,"{F2}","F2"], [72,"{F3}","F3"], [73,"{F4}","F4"], [74,"{F5}","F5"], [75,"{F6}","F6"], [76,"{F8}","F7"], _
    [77,"{F8}","F8"], [78,"{F9}","F9"], [79,"{F10}","F10"], [7&"A","{F11}","F11"], [7&"B","{F12}","F12"], [90,"{NUMLOCK}","Num Lock"], [91,"{SCROLLLOCK}","Scroll Lock"], _
    ["A"&2,"{LCTRL}","Left Control"], ["A"&3,"{RCTRL}","Right Control"], ["A"&4,"{LALT}","Left Menu"], ["A"&5,"{RALT}","Right Menu"], [5&"B","{LWIN}","Left Windows"] ]

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

    do
    for $i = 0 to UBound($sList)-1 step 1
    If _IsPressed($sList[$i][0], $sDll) then
    DllClose($sDll)
    If $sBack <> 0 then
    Return $sList[$i][$sBack-1]
    else
    Local $sResult[3] = [$sList[$i][0],$sList[$i][1],$sList[$i][2]]
    Return $sResult
    endif
    endif
    Next
    until $sTime <= TimerDiff($sTimer)
    DllClose($sDll)
    SetError(1)
    EndFunc

    [/autoit]


    -Alle 10 Sekunden wird die Score um 150 erhöht.
    - Durch den Block, wo 100 draufsteht kann man 100 Punkte erhalten. Durch den Bonus Block bekommt man eine zufällige Punktzahl zwischen 50 und 500 dazu
    - Durch den Malus Block bekommt man eine zufällige Punktzahl zwischen 25 und 250 abgezogen
    - Nach 20 Sekunden verschwindet der block, wenn er nicht eingesammelt wurde
    Die Grafik ist mit im Anhang

    Steuerung:

    • Linker Block: S | W
      Oberer Block: A | S
      Rechter Block: Pfeiltaste nach oben | Pfeiltaste nach unten
      Unterer Block: Pfeiltaste nach links | Pfeiltaste nach rechts

    ToDo:

    Spoiler anzeigen

    • Items
    • Highscore

    Bug's:

    Spoiler anzeigen
    • Seitliche-/Eckkollision wird nicht erkannt


    NEU: QuickDraw Version
    Vielen Dank an moritz1243 für die QuickDraw UDF und DLL
    Es gibt jetzt sowohl eine GDI+, als auch eine QuickDraw Version.
    Das Zip Archiv im Anhang enthält alle benötigten Dateien.
    Source:

    Spoiler anzeigen
    [autoit]

    #RequireAdmin
    #AutoIt3Wrapper_usex64=n
    #region includes
    #include <GUIListView.au3>
    #include <Array.au3>
    #include "QuickDraw.au3"
    #include <Sound.au3>
    #include <Misc.au3>
    #endregion includes
    #region Globale Variablen und Einstellungen
    OnAutoItExitRegister("_exit")
    Opt("GUICloseOnESC", 0)
    Global $handle, $h[5], $sh[5], $xl = 25, $yl = 70, $xt = 70, $yt = 25, $xr = 460, $yr = 70, $xb = 70, $yb = 460, $score = 0, $ballpos[2] = [250, 250], $delaybmove = IniRead("data/config.ini", "Other", "BSpeed", 50), $varx = 5, $vary = 3, $game = True, $drawbonusmalus = False, $xbonus, $ybonus, $GameBG = IniRead("data/config.ini", "Colors", "Game Background", "0xFF000000"), $pxb = IniRead("data/config.ini", "Other", "pxb", 5)
    Const $vWidth = 10, $vHeight = 50, $hWidth = 50, $hHeight = 10, $ly = 20, $lx = 20, $lwidth = 455, $lheight = 455
    $hits = StringRegExp(FileRead("data/config.ini"), "(.*)\nKollisionsound=(.*)", 3)
    If IsArray($hits) Then $hits = StringReplace($hits[1], @CR, "")
    $hits = _SoundOpen($hits)
    If @error Then $hits = _SoundOpen("data/sfx/hit.wav")
    #endregion Globale Variablen und Einstellungen
    #region Farben
    $LeftBrickBrush = IniRead("data/config.ini", "Colors", "Left Brick Color", "0xFFFFFFFF")
    $TopBrickBrush = IniRead("data/config.ini", "Colors", "Top Brick Color", "0xFFFFFFFF")
    $RightBrickBrush = IniRead("data/config.ini", "Colors", "Right Brick Color", "0xFFFFFFFF")
    $BottomBrickBrush = IniRead("data/config.ini", "Colors", "Bottom Brick Color", "0xFFFFFFFF")
    $BallBrush = IniRead("data/config.ini", "Colors", "Ball Color", "0xFFFFFFFF")
    $LinePen = IniRead("data/config.ini", "Colors", "Line Color", "0xFFFF0000")
    #endregion Farben
    While 1
    #region Hauptmenü
    $sGUI = GUICreate("", 343, 213, -1, -1, 0x80000000 + 0x00800000)
    GUISetFont(20, 800, 2, "Courier New")
    GUICtrlSetDefColor(IniRead("data\config.ini", "Colors", "FontColor", "0xFFFF00"))
    GUISetBkColor(IniRead("data/config.ini", "Colors", "Menu Background", "0x000000"))
    $start = GUICtrlCreateLabel("Starten", 104, 8, 116, 35)
    $credits = GUICtrlCreateLabel("Credits", 104, 132, 116, 35)
    $exit = GUICtrlCreateLabel("Beenden", 104, 169, 116, 35)
    $options = GUICtrlCreateLabel("Optionen", 104, 89, 140, 35)
    $highscore = GUICtrlCreateLabel("Highscore", 104, 48, 164, 35)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3, $exit
    Exit
    Case $start
    GUIDelete($sGUI)
    ExitLoop
    Case $highscore
    $shGUI = GUICreate("Highscores", 625, 443, 192, 124)
    $hListView = GUICtrlCreateListView("Name|Punkte|Datum", 30, 30, 355, 400)
    _GUICtrlListView_SetColumnWidth(GUICtrlGetHandle($hListView), 0, 200)
    _GUICtrlListView_SetColumnWidth(GUICtrlGetHandle($hListView), 1, 70)
    _GUICtrlListView_SetColumnWidth(GUICtrlGetHandle($hListView), 2, 80)
    For $i = 0 To 4
    $h[$i] = StringSplit(IniRead("data/highscore.dat", "Highscore", "Highscore" & $i, "||"), "|")
    Next
    _ArrayDisplay($h[0])
    If $h[0][2] > $h[1][2] And $h[0][2] > $h[2][2] And $h[0][2] > $h[3][2] And $h[0][2] > $h[4][2] Then $sh[0] = IniRead("data/highscore.dat", "Highscore", "Highscore0", "")
    If $h[1][2] > $h[0][2] And $h[1][2] > $h[2][2] And $h[1][2] > $h[3][2] And $h[1][2] > $h[4][2] Then $sh[0] = IniRead("data/highscore.dat", "Highscore", "Highscore1", "")

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

    For $i = 0 To 4
    GUICtrlCreateListViewItem($sh[$i], $hListView)
    Next
    GUISetBkColor(0x000000)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3
    Exit
    EndSwitch
    WEnd
    Case $options
    $oGUI = GUICreate("Optionen", 222, 187, -1, -1, 0x80000000 + 0x00800000)
    GUICtrlSetDefColor(0xFFFF00)
    GUISetFont(14, 400, 2, "Courier New")
    GUISetBkColor(0x000000)
    $coloro = GUICtrlCreateLabel("Farben", 64, 24, 70, 25)
    $audioo = GUICtrlCreateLabel("Audio", 64, 80, 59, 25)
    $controlo = GUICtrlCreateLabel("Steuerung", 64, 136, 103, 25)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case $coloro
    $cGUI = GUICreate("Farben", 248, 515, 192, 124)
    GUICtrlSetDefColor(0xFFFF00)
    GUISetFont(11, 400, 0, "Courier New")
    GUISetBkColor(0x000000)
    GUICtrlCreateLabel("Schriftfarbe", 16, 16, 112, 21)
    $choosefontcolor = GUICtrlCreateButton("", 152, 14, 25, 25)
    GUICtrlCreateLabel("Hintergrundfarben:", 16, 64, 166, 21)
    GUICtrlCreateLabel("Startmenü", 64, 96, 85, 21)
    $choosemenubg = GUICtrlCreateButton("", 176, 94, 25, 25)
    GUICtrlCreateLabel("Spiel", 64, 136, 49, 21)
    $choosegamebg = GUICtrlCreateButton("", 176, 134, 25, 25)
    GUICtrlCreateLabel("Brickfarben:", 16, 184, 112, 21)
    GUICtrlCreateLabel("Links", 64, 216, 49, 21)
    $chooseleftbrick = GUICtrlCreateButton("", 176, 214, 25, 25)
    GUICtrlCreateLabel("Oben", 64, 256, 40, 21)
    $choosetopbrick = GUICtrlCreateButton("", 176, 254, 25, 25)
    GUICtrlCreateLabel("Rechts", 64, 296, 58, 21)
    $chooserightbrick = GUICtrlCreateButton("", 176, 294, 25, 25)
    GUICtrlCreateLabel("Unten", 64, 336, 49, 21)
    $choosebottombrick = GUICtrlCreateButton("", 176, 334, 25, 25)
    GUICtrlCreateLabel("Randfarbe", 16, 384, 85, 21)
    $chooselinecolor = GUICtrlCreateButton("", 152, 382, 25, 25)
    GUICtrlCreateLabel("Ballfarbe", 16, 430, 85, 21)
    $chooseballcolor = GUICtrlCreateButton("", 152, 424, 25, 25)
    $save = GUICtrlCreateButton("Speichern", 112, 480, 91, 25)
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($cGUI)
    ExitLoop
    Case $choosefontcolor
    $nfontcolor = _ChooseColor(2)
    GUICtrlSetBkColor($choosefontcolor, $nfontcolor)
    Case $choosemenubg
    $nmenubg = _ChooseColor(2)
    GUICtrlSetBkColor($choosemenubg, $nmenubg)
    Case $choosegamebg
    $ngamebg = _ChooseColor(2)
    GUICtrlSetBkColor($choosegamebg, $ngamebg)
    $0x = StringLeft($ngamebg, 2)
    $rgb = StringRight($ngamebg, 6)
    $ngamebg = $0x & "FF" & $rgb
    Case $chooseleftbrick
    $nleftbrick = _ChooseColor(2)
    GUICtrlSetBkColor($chooseleftbrick, $nleftbrick)
    $0x = StringLeft($nleftbrick, 2)
    $rgb = StringRight($nleftbrick, 6)
    $nleftbrick = $0x & "FF" & $rgb
    Case $choosetopbrick
    $ntopbrick = _ChooseColor(2)
    GUICtrlSetBkColor($choosetopbrick, $ntopbrick)
    $0x = StringLeft($ntopbrick, 2)
    $rgb = StringRight($ntopbrick, 6)
    $ntopbrick = $0x & "FF" & $rgb
    Case $chooserightbrick
    $nrightbrick = _ChooseColor(2)
    GUICtrlSetBkColor($chooserightbrick, $nrightbrick)
    $0x = StringLeft($nrightbrick, 2)
    $rgb = StringRight($nrightbrick, 6)
    $nrightbrick = $0x & "FF" & $rgb
    Case $choosebottombrick
    $nbottombrick = _ChooseColor(2)
    GUICtrlSetBkColor($choosebottombrick, $nbottombrick)
    $0x = StringLeft($nbottombrick, 2)
    $rgb = StringRight($nbottombrick, 6)
    $nbottombrick = $0x & "FF" & $rgb
    Case $chooselinecolor
    $nlinecolor = _ChooseColor(2)
    GUICtrlSetBkColor($chooselinecolor, $nlinecolor)
    $0x = StringLeft($nlinecolor, 2)
    $rgb = StringRight($nlinecolor, 6)
    $nlinecolor = $0x & "FF" & $rgb
    Case $chooseballcolor
    $nballcolor = _ChooseColor(2)
    GUICtrlSetBkColor($chooselinecolor, $nballcolor)
    $0x = StringLeft($nballcolor, 2)
    $rgb = StringRight($nballcolor, 6)
    $nballcolor = $0x & "FF" & $rgb
    Case $save
    If IsDeclared("nfontcolor") Then IniWrite("data/config.ini", "Colors", "FontColor", $nfontcolor)
    If IsDeclared("nmenubg") Then IniWrite("data/config.ini", "Colors", "Menu Background", $nmenubg)
    If IsDeclared("ngamebg") Then IniWrite("data/config.ini", "Colors", "Game Background", $ngamebg)
    If IsDeclared("nleftbrick") Then IniWrite("data/config.ini", "Colors", "Left Brick Color", $nleftbrick)
    If IsDeclared("ntopbrick") Then IniWrite("data/config.ini", "Colors", "Top Brick Color", $ntopbrick)
    If IsDeclared("nrightbrick") Then IniWrite("data/config.ini", "Colors", "Right Brick Color", $nrightbrick)
    If IsDeclared("nbottombrick") Then IniWrite("data/config.ini", "Colors", "Bottom Brick Color", $nbottombrick)
    If IsDeclared("nlinecolor") Then IniWrite("data/config.ini", "Colors", "Line Color", $nlinecolor)
    If IsDeclared("nballcolor") Then IniWrite("data/config.ini", "Colors", "Ball Color", $nballcolor)
    GUIDelete($cGUI)
    ExitLoop
    EndSwitch
    If _IsPressed("1B") Then
    GUIDelete($cGUI)
    ExitLoop
    EndIf
    WEnd
    Case $audioo
    $aGUI = GUICreate("Audio", 342, 175, 192, 124)
    GUISetBkColor(0x000000)
    GUICtrlSetDefColor(0xFFFF00)
    GUISetFont(10, 400, 0, "Courier New")
    GUICtrlCreateLabel("Hintergrundmusik", 16, 16, 132, 20)
    $bgmusic = GUICtrlCreateInput("", 152, 15, 121, 21)
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlCreateLabel("Sounds:", 16, 48, 60, 20)
    GUICtrlCreateLabel("Kollision", 48, 80, 76, 20)
    $kollisionsound = GUICtrlCreateInput("", 152, 79, 121, 21)
    GUICtrlSetColor(-1, 0x000000)
    GUICtrlCreateLabel("Ende", 48, 112, 36, 20)
    $endsound = GUICtrlCreateInput("", 152, 111, 121, 21)
    GUICtrlSetColor(-1, 0x000000)
    $searchbgm = GUICtrlCreateButton("...", 288, 13, 35, 25)
    GUICtrlSetColor(-1, 0x000000)
    $searchsk = GUICtrlCreateButton("...", 288, 77, 35, 25)
    GUICtrlSetColor(-1, 0x000000)
    $searchse = GUICtrlCreateButton("...", 288, 109, 35, 25)
    GUICtrlSetColor(-1, 0x000000)
    $save = GUICtrlCreateButton("Speichern", 56, 144, 75, 25)
    GUICtrlSetColor(-1, 0x000000)
    $standard = GUICtrlCreateButton("Standart", 152, 144, 75, 25)
    GUICtrlSetColor(-1, 0x000000)
    GUISetState(@SW_SHOW)
    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($aGUI)
    ExitLoop
    Case $searchbgm
    GUICtrlSetData($bgmusic, FileOpenDialog("Datei auswählen", Default, "Musikdateien (*.mp3;*.wav)"))
    Case $searchsk
    GUICtrlSetData($kollisionsound, FileOpenDialog("Datei auswählen", Default, "Musikdateien (*.mp3;*.wav)"))
    Case $searchse
    GUICtrlSetData($endsound, FileOpenDialog("Datei auswählen", Default, "Musikdateien (*.mp3;*.wav)"))
    Case $save
    If GUICtrlRead($bgmusic) <> "" Then
    If IniRead("data/config.ini", "Audio", "Background Music", "") = "" Then IniWrite("data/config.ini", "Audio", "Background Music", "")
    $bgm = StringRegExpReplace(FileRead("data/config.ini"), "Background Music=.*", "Background Music=" & GUICtrlRead($bgmusic))
    FileWrite("data/config.ini", $bgm)
    EndIf
    If GUICtrlRead($kollisionsound) <> "" Then
    If IniRead("data/config.ini", "Audio", "Kollisionsound", "") = "" Then IniWrite("data/config.ini", "Audio", "Kollisionsound", "")
    $kss = StringRegExpReplace(FileRead("data/config.ini"), "Kollisionsound=.*", "Kollisionsound=" & GUICtrlRead($kollisionsound))
    FileWrite("data/config.ini", $kss)
    EndIf
    If GUICtrlRead($endsound) <> "" Then
    If IniRead("data/config.ini", "Audio", "End", "") = "" Then IniWrite("data/config.ini", "Audio", "End", "")
    $ends = StringRegExpReplace(FileRead("data/config.ini"), "End=.*", "End=" & GUICtrlRead($endsound))
    FileWrite("data/config.ini", $ends)
    EndIf
    GUIDelete($aGUI)
    ExitLoop
    Case $standard
    IniDelete("data/config.ini", "Audio")
    GUIDelete($aGUI)
    ExitLoop
    EndSwitch
    If _IsPressed("1B") Then
    GUIDelete($aGUI)
    ExitLoop
    EndIf
    WEnd
    Case $controlo
    $cGUI = GUICreate("Steuerung", 341, 605, 192, 124)
    GUISetFont(10, 400, 0, "Courier New")
    GUISetBkColor(0x000000)
    GUICtrlCreateLabel("Geschwindigkeit vom Ball", 24, 16, 196, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $bspeed = GUICtrlCreateInput(IniRead("data/config.ini", "Other", "BSpeed", "50"), 256, 14, 41, 24, 0x2000)
    $Ud1 = GUICtrlCreateUpdown($bspeed)
    GUICtrlSetLimit($bspeed, 2)
    GUICtrlSetLimit($Ud1, 99)
    GUICtrlCreateLabel("Pixelbewegung vom Brick", 24, 56, 188, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $pxp = GUICtrlCreateInput(IniRead("data/config.ini", "Other", "pxb", "5"), 256, 54, 41, 24, 0x2000)
    $Ud2 = GUICtrlCreateUpdown($pxp)
    GUICtrlSetLimit($pxp, 2)
    GUICtrlSetLimit($Ud2, 20)
    GUICtrlCreateLabel("Linker Brick", 24, 96, 100, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hklt = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkltn", "W"), 96, 128, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hklb = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hklbn", "S"), 96, 152, 284, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUICtrlCreateLabel("Oberer Brick", 24, 192, 100, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hktl = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hktln", "A"), 96, 232, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hktr = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hktrn", "D"), 96, 264, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUICtrlCreateLabel("Rechter Brick", 24, 312, 108, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkrt = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkrtn", "Up Arrow"), 88, 352, 300, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkrb = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkrbn", "Down Arrow"), 88, 392, 316, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUICtrlCreateLabel("Unterer Block", 24, 440, 108, 20)
    GUICtrlSetFont(-1, 10, 400, 4, "Courier New")
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkul = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkuln", "Left Arrow"), 88, 480, 308, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $hkur = GUICtrlCreateLabel(IniRead("data/config.ini", "Tastenbelegung", "hkurn", "Right Arrow"), 88, 520, 316, 20)
    GUICtrlSetColor(-1, 0xFFFF00)
    $save = GUICtrlCreateButton("Speichern", 40, 568, 75, 25)
    $standard = GUICtrlCreateButton("Standart", 192, 568, 75, 25)
    GUISetState(@SW_SHOW)
    Local $hotkeylt, $hotkeylb, $hotkeytl, $hotkeytr, $hotkeyrt, $hotkeyrb, $hotkeyur, $hotkeyul
    While 1
    Switch GUIGetMsg()
    Case -3
    GUIDelete($cGUI)
    ExitLoop
    Case $save
    IniWrite("data/config.ini", "Other", "BSpeed", GUICtrlRead($bspeed))
    IniWrite("data/config.ini", "Other", "pxb", GUICtrlRead($pxp))
    If IsArray($hotkeylt) Then IniWrite("data/config.ini", "Tastenbelegung", "hkltn", $hotkeylt[2])
    If IsArray($hotkeylt) Then IniWrite("data/config.ini", "Tastenbelegung", "hklt", $hotkeylt[0])
    If IsArray($hotkeylb) Then IniWrite("data/config.ini", "Tastenbelegung", "hklbn", $hotkeylb[2])
    If IsArray($hotkeylb) Then IniWrite("data/config.ini", "Tastenbelegung", "hklb", $hotkeylb[0])
    If IsArray($hotkeytl) Then IniWrite("data/config.ini", "Tastenbelegung", "hktln", $hotkeytl[2])
    If IsArray($hotkeytl) Then IniWrite("data/config.ini", "Tastenbelegung", "hktl", $hotkeytl[0])
    If IsArray($hotkeytr) Then IniWrite("data/config.ini", "Tastenbelegung", "hktrn", $hotkeytr[2])
    If IsArray($hotkeytr) Then IniWrite("data/config.ini", "Tastenbelegung", "hktr", $hotkeytr[0])
    If IsArray($hotkeyrt) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrtn", $hotkeyrt[2])
    If IsArray($hotkeyrt) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrt", $hotkeyrt[0])
    If IsArray($hotkeyrb) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrbn", $hotkeyrb[2])
    If IsArray($hotkeyrb) Then IniWrite("data/config.ini", "Tastenbelegung", "hkrb", $hotkeyrb[0])
    If IsArray($hotkeyur) Then IniWrite("data/config.ini", "Tastenbelegung", "hkurn", $hotkeyur[2])
    If IsArray($hotkeyur) Then IniWrite("data/config.ini", "Tastenbelegung", "hkur", $hotkeyur[0])
    If IsArray($hotkeyul) Then IniWrite("data/config.ini", "Tastenbelegung", "hkuln", $hotkeyul[2])
    If IsArray($hotkeyul) Then IniWrite("data/config.ini", "Tastenbelegung", "hkul", $hotkeyul[0])
    GUIDelete($cGUI)
    ExitLoop
    Case $standard
    IniDelete("data/config.ini", "Other")
    IniDelete("data/config.ini", "Tastenbelegung")
    Case $hklt
    GUICtrlSetData($hklt, "Taste drücken...")
    GUICtrlSetState($hklt, 256)
    While Sleep(10)
    $hotkeylt = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hklt, $hotkeylt[2])
    Case $hklb
    GUICtrlSetData($hklb, "Taste drücken...")
    GUICtrlSetState($hklb, 256)
    While Sleep(10)
    $hotkeylb = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hklb, $hotkeylb[2])
    Case $hktl
    GUICtrlSetData($hktl, "Taste drücken...")
    GUICtrlSetState($hktl, 256)
    While Sleep(10)
    $hotkeytl = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hktl, $hotkeytl[2])
    Case $hktr
    GUICtrlSetData($hktr, "Taste drücken...")
    GUICtrlSetState($hktr, 256)
    While Sleep(10)
    $hotkeytr = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hktr, $hotkeytr[2])
    Case $hkrt
    GUICtrlSetData($hkrt, "Taste drücken...")
    GUICtrlSetState($hkrt, 256)
    While Sleep(10)
    $hotkeyrt = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkrt, $hotkeyrt[2])
    Case $hkrb
    GUICtrlSetData($hkrb, "Taste drücken...")
    GUICtrlSetState($hkrb, 256)
    While Sleep(10)
    $hotkeyrb = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkrb, $hotkeyrb[2])
    Case $hkur
    GUICtrlSetData($hkur, "Taste drücken...")
    GUICtrlSetState($hkur, 256)
    While Sleep(10)
    $hotkeyur = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkur, $hotkeyur[2])
    Case $hkul
    GUICtrlSetData($hkul, "Taste drücken...")
    GUICtrlSetState($hkul, 256)
    While Sleep(10)
    $hotkeyul = GetKeyInput(10000)
    If Not @error Then ExitLoop
    WEnd
    GUICtrlSetData($hkul, $hotkeyul[2])
    EndSwitch
    If GUICtrlRead($pxp) > 20 Then GUICtrlSetData($pxp, 20)
    WEnd
    EndSwitch
    If _IsPressed("1B") Then
    GUIDelete($oGUI)
    ExitLoop
    EndIf
    WEnd
    Case $credits
    MsgBox(64, "Fehler", "Diese Funktion ist noch nicht verfügbar")
    EndSwitch
    WEnd
    #endregion Hauptmenü
    #region GameGUI
    $game = True
    If IniRead("data/config.ini", "Audio", "Background Music", "") <> "" Then
    $bgmpath = StringRegExp(FileRead("data/config.ini"), "(.*)\nBackground Music=(.*)", 3)

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

    If IsArray($bgmpath) Then $bgmpath = StringReplace($bgmpath[1], @CR, "")
    $musictime = _SoundLength($bgmpath, 2)
    Else
    $musictime = 100000000000000
    $bgmpath = ""
    EndIf
    _QuickDraw_Enable("QuickDraw Test", 500, 500, False)
    _QuickDraw_Rect($lx, $ly, $lwidth, $lheight, $Draw_Line, $LinePen)
    $ptrFont = _QuickDraw_CreateFont("Comic Sans MS")
    _QuickDraw_Text(2, 10, "Score: " & $score, 15, $ptrFont, $Draw_Fill, 0xFFFFFF00)
    $bonus = _QuickDraw_LoadTexture("data/images/bonus.bmp")
    $malus = _QuickDraw_LoadTexture("data/images/malus.bmp")
    $Randomtime = Random(30000, 50000, 1)
    $moveballtimer = TimerInit()
    $scoretimer = TimerInit()
    $handletimer = TimerInit()
    $musicpos = TimerInit()
    $timeout = ""
    _SoundPlay($bgmpath)
    Local $lt = IniRead("data/config.ini", "Tastenbelegung", "hklt", 57), $lb = IniRead("data/config.ini", "Tastenbelegung", "hklb", 53), $tl = IniRead("data/config.ini", "Tastenbelegung", "hktl", 41), $tr = IniRead("data/config.ini", "Tastenbelegung", "hktr", 44)
    Local $rt = IniRead("data/config.ini", "Tastenbelegung", "hkrt", 26), $rb = IniRead("data/config.ini", "Tastenbelegung", "hkrb", 28), $ur = IniRead("data/config.ini", "Tastenbelegung", "hkur", 27), $ul = IniRead("data/config.ini", "Tastenbelegung", "hkul", 25)

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

    While _QuickDraw_Running() And $game = True
    _QuickDraw_ClearBuffer(0xFF000000)
    _QuickDraw_Text(2, 10, "Score: " & $score, 15, $ptrFont, $Draw_Fill, 0xFFFFFF00)
    _QuickDraw_Rect($lx, $ly, $lwidth, $lheight, $Draw_Line, $LinePen)
    drawblocks()
    drawball()
    If $drawbonusmalus Then _QuickDraw_Rect($xbonus, $ybonus, 20, 20, $handle, 0xFFFFFFFF)
    Switch GUIGetMsg()
    Case -3
    ExitLoop
    EndSwitch
    If _IsPressed($ul) And $xb > 25 Then moveblock(4, "l")
    If _IsPressed($ur) And $xb < 420 Then moveblock(4, "r")
    If _IsPressed($rt) And $yr > 25 Then moveblock(3, "u")
    If _IsPressed($rb) And $yr < 420 Then moveblock(3, "d")
    If _IsPressed($tl) And $xt > 25 Then moveblock(2, "l")
    If _IsPressed($tr) And $xt < 420 Then moveblock(2, "r")
    If _IsPressed($lt) And $yl > 25 Then moveblock(1, "u")
    If _IsPressed($lb) And $yl < 420 Then moveblock(1, "d")
    If TimerDiff($moveballtimer) >= $delaybmove Then
    moveball()
    $moveballtimer = TimerInit()
    EndIf
    If TimerDiff($scoretimer) >= 10000 Then
    $score += 150
    $scoretimer = TimerInit()
    EndIf
    If TimerDiff($handletimer) >= $Randomtime And $drawbonusmalus = False Then
    $type = Random(1, 2, 1)
    If $type = 1 Then $handle = $bonus
    If $type = 2 Then $handle = $malus
    $Randomtime = Random(30000, 50000, 1)
    $handletimer = TimerInit()
    createrandombonus(Random(50, 430, 1), Random(50, 430, 1))
    $timeout = TimerInit()
    EndIf
    If _RectCollision($xbonus, $ybonus, 20, 20, $ballpos[0], $ballpos[1], 25, 25) And $drawbonusmalus Then
    $Randomtime = Random(30000, 50000, 1)
    $handletimer = TimerInit()
    $drawbonusmalus = False
    If $type = 1 Then $score += Random(50, 500, 1)
    If $type = 2 And $score > 0 Then $score -= Random(50, 500, 1)
    EndIf
    If TimerDiff($timeout) >= 20000 And $drawbonusmalus Then $drawbonusmalus = False
    If TimerDiff($musicpos) >= $musictime + 3000 Then
    _SoundPlay($bgmpath)
    $musicpos = TimerInit()
    EndIf
    _QuickDraw_SwapBuffers()
    WEnd
    #endregion GameGUI
    $score = 0
    $drawbonusmalus = False
    _exit()
    $ballpos[0] = 250
    $ballpos[1] = 250
    $soundpath = IniRead("data/config.ini", "Audio", "Background Music", "")
    _SoundStop($bgmpath)
    WEnd
    #region Funktionen
    #region Zeichnen
    Func createrandombonus($handlex, $handley)
    $xbonus = $handlex
    $ybonus = $handley
    $drawbonusmalus = True
    _QuickDraw_Rect($handlex, $handley, 20, 20, $handle, 0xFFFFFFFF)
    EndFunc ;==>createrandombonus
    Func drawblocks()
    _QuickDraw_Rect($xl, $yl, $vWidth, $vHeight, $Draw_Fill, $LeftBrickBrush)
    _QuickDraw_Rect($xt, $yt, $hWidth, $hHeight, $Draw_Fill, $TopBrickBrush)
    _QuickDraw_Rect($xr, $yr, $vWidth, $vHeight, $Draw_Fill, $RightBrickBrush)
    _QuickDraw_Rect($xb, $yb, $hWidth, $hHeight, $Draw_Fill, $BottomBrickBrush)
    EndFunc ;==>drawblocks
    Func drawball()
    _QuickDraw_Circle($ballpos[0], $ballpos[1], 10, $Draw_Fill, $BallBrush)
    EndFunc ;==>drawball
    #endregion Zeichnen
    #region Bewegungen
    Func moveblock($block, $direction)
    Switch $block
    Case 1
    If $direction = "u" Then $yl -= $pxb
    If $direction = "d" Then $yl += $pxb
    Case 2
    If $direction = "l" Then $xt -= $pxb
    If $direction = "r" Then $xt += $pxb
    Case 3
    If $direction = "u" Then $yr -= $pxb
    If $direction = "d" Then $yr += $pxb
    Case 4
    If $direction = "l" Then $xb -= $pxb
    If $direction = "r" Then $xb += $pxb
    EndSwitch
    EndFunc ;==>moveblock
    Func moveball()
    If $ballpos[1] >= 460 Or $ballpos[1] <= 10 Then kill()
    If $ballpos[0] >= 460 Or $ballpos[0] <= 10 Then kill()
    If _RectCollision($ballpos[0], $ballpos[1], 10, 10, $xl + 10, $yl, 15, 50) Then
    $varx = $varx * (-1)
    _SoundPlay($hits)
    ElseIf _RectCollision($ballpos[0], $ballpos[1], 10, 10, $xr - 10, $yr, 10, 50) Then
    $varx = $varx * (-1)
    _SoundPlay($hits)
    ElseIf _RectCollision($ballpos[0], $ballpos[1], 10, 10, $xt, $yt + 10, 50, 15) Then
    $vary = $vary * (-1)
    _SoundPlay($hits)
    ElseIf _RectCollision($ballpos[0], $ballpos[1], 10, 10, $xb, $yb - 6, 50, 10) Then
    $vary = $vary * (-1)
    _SoundPlay($hits)
    EndIf
    $ballpos[0] += $varx
    $ballpos[1] += $vary
    EndFunc ;==>moveball
    #endregion Bewegungen
    Func kill()
    SoundPlay(IniRead("data/config.ini", "Audio", "End", "data/sfx/loose.wav"))
    MsgBox(64, "Verloren", "Du hast mit " & $score & " Punkten verloren")
    $game = False
    EndFunc ;==>kill
    Func _exit()
    _QuickDraw_FreeFont($ptrFont)
    _QuickDraw_FreeTexture($bonus)
    _QuickDraw_FreeTexture($malus)
    _QuickDraw_Disable()
    _SoundClose($hits)
    EndFunc ;==>_exit
    #endregion Funktionen
    Func _RectCollision($iX1, $iY1, $iWidth1, $iHeight1, $iX2, $iY2, $iWidth2, $iHeight2)
    ;Author: Faweyr
    Return $iX1 + $iWidth1 > $iX2 And $iX1 < $iX2 + $iWidth2 And $iY1 + $iHeight1 > $iY2 And $iY1 < $iY2 + $iHeight2
    EndFunc ;==>_RectCollision
    ; Autor: Faweyr
    ; Function: GetKeyInput($sTime,$sBack)
    ; Parameter: $sTime = Time to wait and check for pressed Keys
    ; $sBack = the kind of Result
    ; 0 = Array[3] = ["_ispressed"-Code , "Send"-Code , Name of Key]
    ; 1 = "_ispressed"-Code
    ; 2 = "Send"-Code
    ; 3 = Name of Key
    ; Includes: <Misc.au3>
    Func GetKeyInput($sTime = 5000, $sBack = 0)
    $sTimer = TimerInit()
    $sDll = DllOpen("user32.dll")
    Local $sList[111][3] = [[08, "{BACKSPACE}", "Backspace"],[09, "{TAB}", "Tab"],[0 & "D", "{ENTER}", "Enter"],["A" & 0, "{LSHIFT}", "Left Shift"],["A" & 1, "{RSHIFT}", "Right Shift"], _
    [13, "{Pause}", "Pause"],[14, "{CAPSLOCK}", "Caps Lock"],[1 & "B", "{ESC}", "Esc"],[20, "{SPACE}", "Spacebar"],[21, "{PGUP}", "Page Up"],[22, "{PGDN}", "Page Down"],[23, "{End}", "End"], _
    [24, "{Home}", "Home"],[25, "{Left}", "Left Arrow"],[26, "{UP}", "Up Arrow"],[27, "{Right}", "Right Arrow"],[28, "{Down}", "Down Arrow"],[12, "{ALT}", "Alt"],[5 & "C", "{RWIN}", "Right Windows"], _
    [2 & "C", "{PRINTSCREEN}", "Print Screen"],[2 & "D", "{INS}", "Ins"],[2 & "E", "{DELETE}", "Del"],[30, 0, "0"],[31, 1, "1"],[32, 2, "2"], _
    [33, 3, "3"],[34, 4, "4"],[35, 5, "5"],[36, 6, "6"],[37, 7, "7"],[38, 8, "8"],[39, 9, "9"], _
    [41, "a", "A"],[42, "b", "B"],[43, "c", "C"],[44, "d", "D"],[45, "e", "E"],[46, "f", "F"],[47, "g", "G"], _
    [48, "h", "H"],[49, "i", "I"],[4 & "A", "j", "J"],[4 & "B", "k", "K"],[4 & "C", "l", "L"],[4 & "D", "m", "M"],[4 & "E", "n", "N"], _
    [4 & "F", "o", "O"],[50, "p", "P"],[51, "q", "Q"],[52, "r", "R"],[53, "s", "S"],[54, "t", "T"],[55, "u", "U"], _
    [56, "v", "V"],[57, "w", "W"],[58, "x", "X"],[59, "y", "Y"],[5 & "A", "z", "Z"],[60, "{NUMPAD0}", "Keypad 0"],[61, "{NUMPAD1}", "Keypad 1"], _
    [62, "{NUMPAD2}", "Keypad 2"],[63, "{NUMPAD3}", "Keypad 3"],[64, "{NUMPAD4}", "Keypad 4"],[65, "{NUMPAD5}", "Keypad 5"],[66, "{NUMPAD6}", "Keypad 6"],[67, "{NUMPAD7}", "Keypad 7"],[68, "{NUMPAD8}", "Keypad 8"], _
    [69, "{NUMPAD9}", "Keypad 9"],[6 & "A", "{NUMPADMULT}", "Multiply"],[6 & "B", "{NUMPADADD}", "Add"],[6 & "C", "{NUMPADENTER}", "Separator"],[6 & "D", "{NUMPADSUB}", "Subtract"],[6 & "E", "{NUMPADDOT}", "Decimal"],[6 & "F", "{NUMPADDIV}", "Divide"], _
    [70, "{F1}", "F1"],[71, "{F2}", "F2"],[72, "{F3}", "F3"],[73, "{F4}", "F4"],[74, "{F5}", "F5"],[75, "{F6}", "F6"],[76, "{F8}", "F7"], _
    [77, "{F8}", "F8"],[78, "{F9}", "F9"],[79, "{F10}", "F10"],[7 & "A", "{F11}", "F11"],[7 & "B", "{F12}", "F12"],[90, "{NUMLOCK}", "Num Lock"],[91, "{SCROLLLOCK}", "Scroll Lock"], _
    ["A" & 2, "{LCTRL}", "Left Control"],["A" & 3, "{RCTRL}", "Right Control"],["A" & 4, "{LALT}", "Left Menu"],["A" & 5, "{RALT}", "Right Menu"],[5 & "B", "{LWIN}", "Left Windows"]]

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

    Do
    For $i = 0 To UBound($sList) - 1 Step 1
    If _IsPressed($sList[$i][0], $sDll) Then
    DllClose($sDll)
    If $sBack <> 0 Then
    Return $sList[$i][$sBack - 1]
    Else
    Local $sResult[3] = [$sList[$i][0], $sList[$i][1], $sList[$i][2]]
    Return $sResult
    EndIf
    EndIf
    Next
    Until $sTime <= TimerDiff($sTimer)
    DllClose($sDll)
    SetError(1)
    EndFunc ;==>GetKeyInput

    [/autoit]


    Die Highscore klappt bei beiden Versionen noch nicht. Gibt da ein paar seltsame Fehler...

    Dateien

    Minigame.zip 261,54 kB – 467 Downloads
  • Aufbau einer Website?

    • Ineluki
    • 23. Juli 2010 um 13:14

    Gib mir den Source deiner Seite und ich bau dir das mit Php ein :)

  • Aufbau einer Website?

    • Ineluki
    • 23. Juli 2010 um 12:52

    Wieso so kompliziert? Geht auch mit Php.
    An den Anfang kommt

    PHP
    <?php
    // deine Methode, um den Tet zu ändern, der Text sollte dann immer in einere Variable gespeichert werden
    ?>
    //Dein Html Zeug
    //die Stelle, wo der Text ist
    <?php
    echo $text ; // $text musst du mit deiner Variable für den Text ersetzen
    ?>
    //der restliche Html Code


    Kleines Beispiel (hab ich auf die schnelle gemacht, also nicht meckern :D) :

    Spoiler anzeigen
    PHP
    <?php 
    $rtext=file("index.txt")     ;
    if ($_GET["page"]==1) {
            $rtext=file("index.txt");
            $current_page="Startseite"   ;
    } 
    elseif ($_GET["page"]==2) {
            $rtext=file("blablabla.txt");
            $current_page="blablabla"   ;
    }
    elseif ($_GET["page"]==3) {
            $rtext=file("blabla.txt");
            $current_page="blabla" ;
    }
    elseif ($_GET["page"]==4) {
            $rtext=file("autoit.txt");
            $current_page="autoit" ;
    }
    elseif ($_GET["page"]==5) {
            $rtext=file("blubb.txt");
            $current_page="blubb";
    }
    elseif ($_GET["page"]==6) {
            $rtext=file("abc.txt");
            $current_page="abc"  ;
    }
    elseif ($_GET["page"]==7) {
            $rtext=file("bla.txt");
            $current_page="Bla" ;
    }
    elseif (!isset($_GET["page"])){
            $_GET["page"]=1 ;
            $current_page="Startseite"    ;
    }?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    </head>
    <body>
    <div id="bgimage" style="margin:0;padding:0;position:absolute;left:0px;top:0px;width:100%;height:100%;text-align:left;z-index:2;">
    <img src="images/leistebg1.png" id="bgimage" alt="" border="0" style="width:100%;height:100%;"/></div>
    <div id="navi" style="margin:0;padding:0;position:absolute;left:10px;top:10px;width:1088px;height:14px;text-align:left;z-index:3;"><a href="?page=3"><img src="images/au1.png" onmousedown="src='images/au3.png'" onmouseover="src='images/au2.png'" onmouseout="src='images/au1.png'"  onclick="src='images/au1.png'" border=0 /></a></div>
    <div id="current_page" style="margin:0;padding:0;position:absolute;left:20px;top:233px;width:188px;height:14px;text-align:left;z-index:3;">
    </a><h3><font color="#000000" face="Times New Roman"></font> <hr /></div>   </h3>
    <div id="text" style="margin:0;padding:0;position:absolute;left:40px;top:350px;width:765px;height:14px;text-align:left;z-index:4;">
    <font style="font-size:15px" color="#000000" face="Arial"><?php 
    foreach ($rtext AS $text)     {
    echo $text       ;
    }
    ?></font></div>
    <div id="banner" style="margin:0;padding:0;position:absolute;left:75px;top:2px;width:662px;height:215px;text-align:left;z-index:5;">
    <img src="images/banner.png" id="banner" alt="" border="0" style="width:662px;height:215px;" /></div>
    </body>
    </html>
    Alles anzeigen
  • Benutzeroberfläche erstellen und aus .txt-datei auslesen

    • Ineluki
    • 23. Juli 2010 um 12:49
    Zitat von darkangel1208


    Kann man mit Autoit eine Benutzeroberfläche ( Buttons,textfelder etc.) erstellen, bzw. mit welchem Programm kann ich eine erstellen, die dann hinterher auch mit Autoit kompatibel ist.


    Ja. Entweder schreibst du den Code selbst, oder lässt ihn mit Kode schreiben. Mit Kode kannst du die GUI nach deinen Wünschen gestalten. Um Koda zu öffnen, einfach mal Alt+M in SciTE drücken.

    Zitat von darkangel1208


    Gibt es die Möglichkeit mit einem Befehl eine txt-datei zu öffnen, dort dann z.B. die 5. Zeile auszulesen ( oder nach einem Wort suchen und die Zeile dann auszulesen) und die Datei wieder schließen. Aber ohne das man das sieht, das soll im Hintergrund ablaufen.


    Guck dir mal

    [autoit]

    FileOpen
    FileRead
    FileClose
    StringInStr

    [/autoit]


    an.

  • Fenster wie bei Win 7 an den Rand schieben

    • Ineluki
    • 23. Juli 2010 um 10:44

    Dann nimmst du eben verschiedene Variablen

  • Fenster wie bei Win 7 an den Rand schieben

    • Ineluki
    • 23. Juli 2010 um 10:37

    Ja, im Arbeitsspeicher...

  • Ball abprallen lassen

    • Ineluki
    • 22. Juli 2010 um 21:02

    Klappt jetzt, danke.

  • Ball abprallen lassen

    • Ineluki
    • 22. Juli 2010 um 20:28

    Das verstehe ich überhaupt nicht ohne Erklärung, sorry.

  • Ball abprallen lassen

    • Ineluki
    • 22. Juli 2010 um 19:56

    Ich wollte ein kleines Spiel machen. Ich müsste dafür es hinbekommen, einen Ball, der sich die ganze Zeit bewegt, an den Rändern abprallen zu lassen.
    Script:

    Spoiler anzeigen
    [autoit]


    #Region includes
    #include <GDIPlus.au3>
    #include <Misc.au3>
    #EndRegion
    #Region Globale Variablen und Einstellungen
    OnAutoItExitRegister("dispose")
    Opt("GUICloseOnESC", 0)
    Global $xl=25, $yl=70, $xt=70, $yt=25, $xr=460, $yr=70, $xb=70, $yb=460, $score=0, $ballpos[2]=[250, 250], $delaybmove=100, $var=5
    Const $vWidth=10, $vHeight=50, $hWidth=50, $hHeight=10, $ly=20, $lx=20, $lwidth=455, $lheight=455
    #EndRegion
    #Region GDI+
    _GDIPlus_Startup()
    $BlockPen=_GDIPlus_PenCreate(0xFFFFFFFF, 4)
    $BlockBrush=_GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    $LinePen=_GDIPlus_PenCreate(0xFFFF0000, 2)
    $sFormat = _GDIPlus_StringFormatCreate()
    $sBrush = _GDIPlus_BrushCreateSolid(0xFFFFFF00)
    $sFamily = _GDIPlus_FontFamilyCreate("Courier New")
    $sFont = _GDIPlus_FontCreate($sFamily, 10)
    $sLayout = _GDIPlus_RectFCreate(5, 5)
    $BallPen=_GDIPlus_PenCreate(0xFFFFFFFF)
    $BallBrush=_GDIPlus_BrushCreateSolid(0xFFFFFFFF)
    #EndRegion
    While 1
    #Region Hauptmenü
    $sGUI = GUICreate("", 342, 143, -1, -1, 0x80000000+0x00800000)
    GUISetFont(20, 800, 2, "Courier New")
    GUISetBkColor(0x000000)
    $start = GUICtrlCreateLabel("Starten", 104, 8, 116, 35)
    GUICtrlSetColor(-1, 0xFFFF00)
    $credits = GUICtrlCreateLabel("Credits", 104, 52, 116, 35)
    GUICtrlSetColor(-1, 0xFFFF00)
    $exit = GUICtrlCreateLabel("Beenden", 104, 97, 116, 35)
    GUICtrlSetColor(-1, 0xFFFF00)
    GUISetState()
    While 1
    Switch GUIGetMsg()
    Case -3, $exit
    Exit
    Case $start
    GUIDelete($sGUI)
    ExitLoop
    Case $credits
    EndSwitch
    WEnd
    #EndRegion
    #Region GameGUI
    $hGUI = GUICreate("Minigame", 500, 500, -1, -1, 0x80000000+0x00800000)
    GUISetBkColor(0x000000)
    $hGraphics=_GDIPlus_GraphicsCreateFromHWND($hGUI)
    $hBitmap=_GDIPlus_BitmapCreateFromGraphics(500, 500, $hGraphics)
    $hBuffer=_GDIPlus_ImageGetGraphicsContext($hBitmap)
    GUISetState()
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    AdlibRegister("moveball", $delaybmove)
    While sleep(1)
    Switch GUIGetMsg()
    Case -3
    ExitLoop
    EndSwitch
    If _IsPressed("1B") Then ExitLoop
    If _IsPressed(25) And $xb>25 Then moveblock(4, "l")
    If _IsPressed(27) And $xb<420 Then moveblock(4, "r")
    If _IsPressed(26) And $yr>25 Then moveblock(3, "u")
    If _IsPressed(28) And $yr<420 Then moveblock(3, "d")
    If _IsPressed(41) And $xt>25 Then moveblock(2, "l")
    If _IsPressed(44) And $xt<420 Then moveblock(2, "r")
    If _IsPressed(57) And $yl>25 Then moveblock(1, "u")
    If _IsPressed(53) And $yl<420 Then moveblock(1, "d")
    If NOT WinActive("Minigame") Then
    AdlibUnRegister("moveball")
    Do
    sleep(100)
    Until WinActive("Minigame")
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    AdlibRegister("moveball", $delaybmove)
    EndIf
    WEnd
    #EndRegion
    GUIDelete($hGUI)
    WEnd
    #Region Funktionen
    #Region Zeichnen
    Func drawblocks()
    _GDIPlus_GraphicsClear($hBuffer)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xl, $yl, $vwidth, $vheight, $BlockPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xl, $yl, $vwidth, $vheight, $BlockBrush)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xt, $yt, $hwidth, $hheight, $BlockPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xt, $yt, $hwidth, $hheight, $BlockBrush)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xr, $yr, $vwidth, $vheight, $BlockPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xr, $yr, $vwidth, $vheight, $BlockBrush)
    _GDIPlus_GraphicsDrawRect($hBuffer, $xb, $yb, $hwidth, $hheight, $BlockPen)
    _GDIPlus_GraphicsFillRect($hBuffer, $xb, $yb, $hwidth, $hheight, $BlockBrush)
    EndFunc
    Func drawball()
    _GDIPlus_GraphicsDrawEllipse($hBuffer, $ballpos[0], $ballpos[1], 20, 20, $BallPen)
    _GDIPlus_GraphicsFillEllipse($hBuffer, $ballpos[0], $ballpos[1], 20, 20, $BallBrush)
    EndFunc
    #EndRegion
    #Region Bewegungen
    Func moveblock($block, $direction)
    Switch $block
    Case 1
    If $direction="u" Then $yl-=5
    If $direction="d" Then $yl+=5
    Case 2
    If $direction="l" Then $xt-=5
    If $direction="r" Then $xt+=5
    Case 3
    If $direction="u" Then $yr-=5
    If $direction="d" Then $yr+=5
    Case 4
    If $direction="l" Then $xb-=5
    If $direction="r" Then $xb+=5
    EndSwitch
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    _GDIPlus_GraphicsClear($hBuffer)
    EndFunc
    Func moveball()
    If $ballpos[1]=430 Or $ballpos[1]=25 Then $var=$var*(-1)
    $ballpos[0]-=$var
    $ballpos[1]-=$var
    drawblocks()
    drawball()
    _GDIPlus_GraphicsDrawRect($hBuffer, $lx, $ly, $lWidth, $lHeight, $LinePen)
    _GDIPlus_GraphicsDrawStringEx($hBuffer, "Score: "&$score, $sFont, $sLayout, $sFormat, $sBrush)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $hBitmap, 0, 0, 500, 500)
    _GDIPlus_GraphicsClear($hBuffer)
    EndFunc
    #EndRegion
    Func dispose()
    _GDIPlus_FontDispose($sFont)
    _GDIPlus_FontFamilyDispose($sFamily)
    _GDIPlus_StringFormatDispose($sFormat)
    _GDIPlus_BrushDispose($sBrush)
    _GDIPlus_BrushDispose($BlockBrush)
    _GDIPlus_BrushDispose($BallBrush)
    _GDIPlus_PenDispose($BallPen)
    _GDIPlus_PenDispose($BlockPen)
    _GDIPlus_PenDispose($LinePen)
    _GDIPlus_GraphicsDispose($hGraphics)
    _GDIPlus_GraphicsDispose($hBuffer)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    EndFunc
    #EndRegion

    [/autoit]


    Ich krieg es einfach nicht hin :(

  • Zahlen werte für Input

    • Ineluki
    • 22. Juli 2010 um 19:10

    Du kannst mit einer If Abfrage prüfen, ob der Wert überschritten wurde, wenn ja, wird der Wert auf einen erlaubten gesetzt. Oder du benutzt ein UpDown

  • Programme auf Buttons binden?!

    • Ineluki
    • 22. Juli 2010 um 14:32

    Suchst du

    [autoit]

    ShellExecute

    [/autoit]


    ?

  • Mein Problem mit den " Gänsefüßen "

    • Ineluki
    • 22. Juli 2010 um 09:59

    Doch meine Methode geht :rolleyes:

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™