Marquee Progressbar?

  • Hallo Leute,
    ich hab gestern abend in der Shoutbox eine Antwort auf meine Frage mit der Progressbar bekommen.
    Ich sollte eine Marquee Progressbar benutzen. Wie muss ich das in Koda einstellen.
    Ich habs versucht mit dem Style $PBS_MARQUEE. Das geht nicht. Wie muss dann das GUICtrlSetData einstellen?

    Danke erstmal.

    MfG button421

    Meine fertigen Projekte:
    VirtualCash
    Monopoly Digital

    Daran arbeite ich gerade:
    Einem Skript, womit man ohne Programmierkentisse eigene Programme machen kann (habe ich selber früher gesucht :D ) Stand: ||||||||||||||||||||||||| 6%

  • Hallo Button421,

    hier ein kleines Beispiel:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <SendMessage.au3>
    #include <ProgressConstants.au3>

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

    Opt("GUIOnEventMode", 1)

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

    $Form1 = GUICreate("Form1", 545, 125,5,5);, $WS_POPUP, $WS_EX_TOOLWINDOW)
    GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
    $Button1 = GUICtrlCreateButton('STOP Marquee',5,5)
    GUISetOnEvent(-1, "StopMarquee")
    $Progress1 = GUICtrlCreateProgress(0, 95, 545, 25, $PBS_MARQUEE)
    $hProgress = GUICtrlGetHandle($Progress1) ;wichtig
    _SendMessage($hProgress, $PBM_SETMARQUEE, True, 10) ;Handle verwenden
    GUISetState(@SW_SHOW)

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

    While 1
    Sleep(100)
    WEnd

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

    Func StopMarquee()
    _SendMessage($hProgress, $PBM_SETMARQUEE, False, 10) ;Handle verwenden
    EndFunc
    Func Form1Close()
    Exit
    EndFunc ;==>Form1Close

    [/autoit]

    du musst es halt in den GuiGetMsg-Modus übetragen ist aber einfach

    mfg autoBert

  • Hallo Button421,

    hier das ganze im GuiGetMsg-Modus:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <SendMessage.au3>
    #include <ProgressConstants.au3>

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

    $Form1 = GUICreate("Form1", 545, 125, 5, 5);, $WS_POPUP, $WS_EX_TOOLWINDOW)
    $Button1 = GUICtrlCreateButton('&STOP Marquee', 5, 5, 200)
    $Progress1 = GUICtrlCreateProgress(0, 95, 545, 25, $PBS_MARQUEE)
    $hProgress = GUICtrlGetHandle($Progress1)
    _SendMessage($hProgress, $PBM_SETMARQUEE, True, 10)
    GUISetState(@SW_SHOW)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Button1
    If GUICtrlRead($Button1) = '&STOP Marquee' Then
    _SendMessage($hProgress, $PBM_SETMARQUEE, False, 10)
    GUICtrlSetData($Button1, '&Resume Marquee')
    Else
    _SendMessage($hProgress, $PBM_SETMARQUEE, True, 10)
    GUICtrlSetData($Button1, '&STOP Marquee')
    EndIf
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    mfg autoBert