Konstanten fehlen in <GuiConstants.au3> ?

  • Hi,

    ich hab ein seltsames Problem,
    bei meinem folgenden Code:


    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <date.au3>

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

    $LastTime = "00:00:00"
    $TextColor = 0xDF1818
    Global $H, $M, $S

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

    $MainGui = GuiCreate("Timer",350,80,0,625,$WS_POPUP,$WS_EX_TOPMOST)
    $CtrlTimePassed = GuiCtrlCreateLabel($LastTime,10,40,160)
    GuiCtrlSetFont(-1,14)

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

    WinSetTrans($MainGui,"",255)
    $Timer = TimerInit()
    AdlibEnable("_CountTime",50)

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

    GuiSetState()

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

    while 1
    sleep(500)
    WEnd

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

    Func _CountTime()
    _TicksToTime(Int(TimerDiff($Timer)),$H,$M,$S)
    If StringLen($H) = 1 then $H = "0" & $H
    If StringLen($M) = 1 then $M = "0" & $M
    If StringLen($S) = 1 then $S = "0" & $S
    $CurTime = $H & ":" & $M & ":" & $S
    IF $LastTime <> $CurTime Then
    GuiCtrlSetData($CtrlTimePassed,$CurTime)
    $LastTime = $H & ":" & $M & ":" & $S
    EndIf
    EndFunc

    [/autoit]

    Der eigentliche Code spielt keine Rolle, es geht mir nur um Zeile 8.
    Wenn ich es Compilen will sagt Au3 Errorcheck mir folgendes:

    Spoiler anzeigen


    D:\Autoit\BwTImer\GUI.au3(9,52) : WARNING: $WS_POPUP: possibly used before declaration.
    $MainGui = GuiCreate("Timer",350,80,0,625,$WS_POPUP,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    D:\Autoit\BwTImer\GUI.au3(9,67) : WARNING: $WS_EX_TOPMOST: possibly used before declaration.
    $MainGui = GuiCreate("Timer",350,80,0,625,$WS_POPUP,$WS_EX_TOPMOST)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    D:\Autoit\BwTImer\GUI.au3(9,52) : ERROR: $WS_POPUP: undeclared global variable.
    $MainGui = GuiCreate("Timer",350,80,0,625,$WS_POPUP,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    D:\Autoit\BwTImer\GUI.au3 - 1 error(s), 2 warning(s)

    aber warum?
    Die Variablen wurden doch durch #include <GUIConstants.au3> definiert, oder nicht?
    Jedenfalls finde ich das in Beispielen der AU3 Hilfe auch nicht anders ;O
    Wo liegt da jetzt das Problem?

    Greetz qon

  • Nein,
    $WS_POPUP ist in WindowsConstants.au3 deklariert:

    [autoit]

    #include <WindowsConstants.au3>

    [/autoit]


    Siehe auch Hilfedatei.

    ok dank dir!
    aber es ist mir schleierhaft, weil in der Autoithilfe wird $WS_POPUP bei dem Eintrag GuiCreate auch verwendet ohne extra includes.
    greetz