Bei 960 ist schluss

  • Hallo,

    Ich habe mal ne frage und zwar habe ich mir folgendes Programm geschrieben:

    [autoit]


    #include <Array.au3>
    #include <GuiConstantsEx.au3>
    #include <Constants.au3>
    HotKeySet('{ESC}', '_exit')
    Global $Array[129][103]
    Global $x = 0
    Global $y = 0
    GUICreate('', @DesktopWidth + 4, @DesktopHeight)
    For $i = 0 to 128
    For $i2 = 0 to 102
    $Array[$i][$i2] = GUICtrlCreateLabel('', $x, $y , 10, 10)
    GUICtrlSetBkColor(-1, 0x000000)
    $x += 20
    Next
    If $x = 2060 Then $x = 10
    If $x = 2070 Then $x = 0
    $y += 10
    ConsoleWrite('Y ist jetzt: ' & $y & @CRLF)
    Next
    GUISetState(@SW_SHOW)
    Func _exit()
    Exit
    EndFunc
    While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    Jetzt habe ich das Problem das der wenn $y 960 ist aufhört das darzustellen und würde gerne wissen warum das so ist oder wo ich ein fehler gemacht habe.

    mfg denno

    Einmal editiert, zuletzt von denno (5. Februar 2010 um 15:52)

  • Spoiler anzeigen
    [autoit]

    #include <Array.au3>
    #include <GuiConstantsEx.au3>
    #include <Constants.au3>
    HotKeySet('{ESC}', '_exit')
    Global $Array[@DesktopHeight / 10 + 1][@DesktopWidth / 20 + 1]
    ;~ _ArrayDisplay($Array)
    Global $x = 0
    Global $y = 0
    GUICreate('', @DesktopWidth + 4, @DesktopHeight)
    For $i = 1 To @DesktopHeight / 10
    $xold = $x
    For $j = 1 To @DesktopWidth / 20
    $Array[$i][$j] = GUICtrlCreateLabel('', $x, $y, 10, 10)
    GUICtrlSetBkColor(-1, 0x000000)
    $x += 20
    Next
    If $xold = 0 Then $x = 10
    If $xold = 10 Then $x = 0
    $y += 10
    ConsoleWrite('Y ist jetzt: ' & $y & @CRLF)
    Next
    GUISetState(@SW_SHOW)
    Func _exit()
    Exit
    EndFunc ;==>_exit
    While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]