Koda unter Windows 7 die Progressbar in einer andere Farbe Anzeigen Lassen.

  • Hallo an Euch!


    Ich will mit Koda Design mir was kleines Basteln wo 2 Progressbar Drin sind der eine soll Grün und der Andere Rot verlaufen.In der Vorschau von Koda Design sieht das auf dem ersten blick Gut aus doch wenn ich das Skript laufen lasse Kommt das Standard Balkon von Windows 7. Ich denke mal das er den Standard nimmt also die vorgabe vom Betriebssystem.

    meine Frage: was müßte ein oder ausgetragen werden damit das Progressbar von Koda Design damit nicht von Windows sondern mit Koda angezeigt wird. :?: :?: :?: :?:


    Gruß Baron

  • Bitteschön, sogar mit Funktion:

    GUIProgress.au3
    [autoit]

    #include-once
    #include<SendMessage.au3>
    #include<ProgressConstants.au3>
    Global Const $PBST_NORMAL = 0x0001
    Global Const $PBST_ERROR = 0x0002
    Global Const $PBST_PAUSED = 0x0003
    Global Const $PBM_SETSTATE = 0x0410
    Global Const $PBM_GETSTATE = 0x0411

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GUICtrlProgress_SetState
    ; Description ...: Sets the state of the progressbar
    ; Syntax.........: _GUICtrlProgress_SetState($iProgress, $iStyle)
    ; Parameters ....: $iProgress - handle or CtrlID of progressbar
    ; $iState - new status of progress:
    ; |$PBM_NORMAL - normal state (green)
    ; |$PBM_ERROR - error state (red)
    ; |$PBM_PAUSED - paused style (yellow)
    ; Return values .: Success -
    ; Failure - 0
    ; Author ........: Prog@ndy
    ; Modified.......:
    ; Remarks .......: requires WinVista or above
    ; Related .......:
    ; Link ..........; @@MsdnLink@@ PBM_SETSTATE
    ; Example .......;
    ; ===============================================================================================================================
    Func _GUICtrlProgress_SetState($iProgress, $iState)
    ; Author: Prog@ndy
    Switch IsHWnd($iProgress)
    Case True
    Return _SendMessage($iProgress, $PBM_SETSTATE, $iState, 0)
    Case Else
    Return GUICtrlSendMsg($iProgress, $PBM_SETSTATE, $iState, 0)
    EndSwitch
    EndFunc ;==>_GUICtrlProgress_SetState

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GUICtrlProgress_GetState
    ; Description ...: Gets the state of the progressbar
    ; Syntax.........: _GUICtrlProgress_GetState($iProgress)
    ; Parameters ....: $iProgress - handle or CtrlID of progressbar
    ; Return values .: Success - status of progress:
    ; |$PBM_NORMAL - normal state (green)
    ; |$PBM_ERROR - error state (red)
    ; |$PBM_PAUSED - paused style (yellow)
    ; Failure - 0
    ; Author ........: Prog@ndy
    ; Modified.......:
    ; Remarks .......: requires WinVista or above
    ; Related .......:
    ; Link ..........; @@MsdnLink@@ PBM_GETSTATE
    ; Example .......;
    ; ===============================================================================================================================
    Func _GUICtrlProgress_GetState($iProgress)
    ; Author: Prog@ndy
    Switch IsHWnd($iProgress)
    Case True
    Return _SendMessage($iProgress, $PBM_GETSTATE, 0, 0)
    Case Else
    Return GUICtrlSendMsg($iProgress, $PBM_GETSTATE, 0, 0)
    EndSwitch
    EndFunc ;==>_GUICtrlProgress_GetState

    [/autoit]
  • Hallo Progandy !

    wenn ich mit diesem Script teste.

    Spoiler anzeigen
    [autoit]

    #include-once
    #include<SendMessage.au3>
    #include<ProgressConstants.au3>
    Global Const $PBST_NORMAL = 0x0001
    Global Const $PBST_ERROR = 0x0002
    Global Const $PBST_PAUSED = 0x0003
    Global Const $PBM_SETSTATE = 0x0410
    Global Const $PBM_GETSTATE = 0x0411

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GUICtrlProgress_SetState
    ; Description ...: Sets the state of the progressbar
    ; Syntax.........: _GUICtrlProgress_SetState($iProgress, $iStyle)
    ; Parameters ....: $iProgress - handle or CtrlID of progressbar
    ; $iState - new status of progress:
    ; |$PBM_NORMAL - normal state (green)
    ; |$PBM_ERROR - error state (red)
    ; |$PBM_PAUSED - paused style (yellow)
    ; Return values .: Success -
    ; Failure - 0
    ; Author ........: Prog@ndy
    ; Modified.......:
    ; Remarks .......: requires WinVista or above
    ; Related .......:
    ; Link ..........; @@MsdnLink@@ PBM_SETSTATE
    ; Example .......;
    ; ===============================================================================================================================
    Func _GUICtrlProgress_SetState($iProgress, $iState)
    ; Author: Prog@ndy
    Switch IsHWnd($iProgress)
    Case True
    Return _SendMessage($iProgress, $PBM_SETSTATE, $iState, 0)
    Case Else
    Return GUICtrlSendMsg($iProgress, $PBM_SETSTATE, $iState, 0)
    EndSwitch
    EndFunc ;==>_GUICtrlProgress_SetState

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _GUICtrlProgress_GetState
    ; Description ...: Gets the state of the progressbar
    ; Syntax.........: _GUICtrlProgress_GetState($iProgress)
    ; Parameters ....: $iProgress - handle or CtrlID of progressbar
    ; Return values .: Success - status of progress:
    ; |$PBM_NORMAL - normal state (green)
    ; |$PBM_ERROR - error state (red)
    ; |$PBM_PAUSED - paused style (yellow)
    ; Failure - 0
    ; Author ........: Prog@ndy
    ; Modified.......:
    ; Remarks .......: requires WinVista or above
    ; Related .......:
    ; Link ..........; @@MsdnLink@@ PBM_GETSTATE
    ; Example .......;
    ; ===============================================================================================================================
    Func _GUICtrlProgress_GetState($iProgress)
    ; Author: Prog@ndy
    Switch IsHWnd($iProgress)
    Case True
    Return _SendMessage($iProgress, $PBM_GETSTATE, 0, 0)
    Case Else
    Return GUICtrlSendMsg($iProgress, $PBM_GETSTATE, 0, 0)
    EndSwitch
    EndFunc ;==>_GUICtrlProgress_GetState

    [/autoit]


    Dann bekomme ich dies als fehler meldung zurück.

    Zitat

    E:\Meine Dokumente\Desktop\jjjjj.au3(7,36) : ERROR: $PBM_SETSTATE previously declared as a 'Const'
    Global Const $PBM_SETSTATE = 0x0410
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    E:\Meine Dokumente\Desktop\jjjjj.au3 - 1 error(s), 0 warning(s)

    was habe ich über sehen :?: :?: :?: :?:

  • Oh, lösche enfach die beiden Zeilen 7 und 8 aus dem Skript. hab nicht überprüft, was denn schon in der ProgressConstants.au3 schon drinsteht ;)

  • Ich habe das Skript nochmal getestet beim start passiert nichts und in meinen Schon mit die eingebauten Progressbar weiß ich nicht wie ich das einbauen soll geschweige den noch wie der Befehl ohne function geht. :?: :?: :?:


    Ich habe in meinen kleinen Gui 2 Progressbar der Eine soll nur Grün oder Blau verlaufen und

    der 2 soll rot verlaufen.

    Wie lautet der befehl ohne Function ??????


    Gruß Baron

  • habe gerade mal nachgeschaut und sehe das ich noch die alte version 3.3.2 habe werde ich mal installieren und nochmal testen . bei meiner alten version habe ich die au3.api immer eingefugt in der neuen version gibt es auch eine oder reicht die au3.api die in der version ist. :?:

    Ich habe geschaut die Neue Version die ich jetzt habe ist 3.3.4 werde es nochmal testen

  • ich habe hier mal ein Beispiel Skript erstellt mit koda Design

    [autoit]

    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 134, 192, 124)
    GUISetBkColor(0x000000)

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

    $Progress1 = GUICtrlCreateProgress(64, 16, 553, 41);Das Progressbar soll nur Grün oder Blau verlaufen
    GUICtrlSetColor(-1, 0x00FF00)
    $Progress2 = GUICtrlCreateProgress(64, 72, 553, 41);dieses Progressbar soll Rot verlaufen
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    GUICtrlSetData ($Progress1, 20) ;hier soll zum test die Balken bei Autoit zu sehen sein.
    GUICtrlSetData ($Progress2, 40) ;hier soll zum test die Balken bei Autoit zu sehen sein.

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    und hier ein Bild was später ungefähr aussehen soll auf das bild zeigt an mit ein pfeil welche farbe das jeweilige Progressbar haben soll.

    [Blockierte Grafik: http://s2.imgimg.de/thumbs/progressbarFarbea8ced57epng.png]


    das wehre echt hilfreich wenn jemandem den beispiel skript den fehlenen Befehl einbauen tut damit das Standard von Windows Progressbar deaktieviert ist damit ich die von Koda benutzen kann.(aber nur meine Skripte so das die Standard Programme mit Windows bleiben). ^^ Bitte um Hilfe ;(


    MfG

    Baron

  • hat einer von euch eine idee zu meinen Skript das die balken des progressbar beide verschiedene farbe haben. :?: :?: :?: :?:


    der beispiel skript wenn der nur ergänzt wird so das es functioniert das die balken 2 farben haben reicht mir damit ich weiter basteln kann.


    das was hier im rahmen im bild zu sehen ist so ungefähr will ich basteln.

    [Blockierte Grafik: http://s2.imgimg.de/thumbs/kitt492420cbajpg.jpg]


    ich Bitte um Dringend hilfe zu meinem beispiel skript damit ich weiß wie man an der sache vorgeht. ;( ;( ;(


    MfG

    Baron

  • [autoit]


    #include <GUIConstantsEx.au3>
    #include <ProgressConstants.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 134, 192, 124)
    GUISetBkColor(0x000000)
    DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0)
    $Progress1 = GUICtrlCreateProgress(64, 16, 553, 41);Das Progressbar soll nur Grün oder Blau verlaufen
    GUICtrlSetColor(-1, 0x00FF00)
    $Progress2 = GUICtrlCreateProgress(64, 72, 553, 41);dieses Progressbar soll Rot verlaufen
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    GUICtrlSetData ($Progress1, 20) ;hier soll zum test die Balken bei Autoit zu sehen sein.
    GUICtrlSetData ($Progress2, 40) ;hier soll zum test die Balken bei Autoit zu sehen sein.

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    so wird die Farbe übernommen