Progress färben und Icons woher?

  • Arbeite immer noch am Downloader :S

    und hab scho parmal gefragt wie man den Progress färbt
    trotz antworten habs immer non net gechecked wies geht ?(

    kann mir da jemand helfen
    scheinbar bin i zu blöd 8|

    Hab noch ne frage
    Ich will jetzt ein menü aufbauen
    aund brauch icons wo bekommt ihr die rechtlich her
    weil einfach aus dem internet kann ichs ja net runterziehen oder? ?(

  • Also die gefärbte progressbar geht und zwar mit folgendem Code:

    [autoit]


    $Prog1 = GUICtrlCreateProgress(10,1 0,400,50);Das Progressbar normal erstellen
    DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle(-1), "wstr", "", "wstr", "") ;Jetzt per DLL-Call das Windows Theme umstellen
    GUICtrlSetColor(-1, 0xFF8C00) ;Die Hauptfarbe des Balkens
    GUICtrlSetBkColor(-1,0) ;Die Hintergrundfarbe

    [/autoit]

    Und falls du Projekte veröffentlichen willst, kannst du nicht einfach Icons aus dem Internet ziehen. Da musst du die Lizenzbestimmungen lesen oder den Betreiber ansprechen. Oder du erstellt selber welche :rock:

    P.S: Geiler Downloader, besonders da ich InetGet bisher nie verstanden habe

  • Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Timers.au3>

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

    DirCreate(@ScriptDir & "\Downloads")
    AdlibRegister ( "_Progress" , 500 )
    AdlibRegister ( "_time" , 500 )

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

    DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0)

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

    $download=InetGet("http://download.mozilla.org/?product=firefox-6.0.2&os=win&lang=de",@ScriptDir & "\Downloads\test_firefox.de",1,1) ;der download
    $gui=GUICreate("Test",1020,80)
    $progressbar=GUICtrlCreateProgress(10,30,1000,20)
    GUICtrlSetColor ($progressbar, 0x0000FF)

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

    $kb_and_procent_label = GuiCtrlCreateLabel("0 kb von 0 kb; 0 % von 100 %" ,10 ,60 ,1000 ,20)
    $time_label=GUICtrlCreateLabel("Verbleibende Zeit: ---Wird Berechnet--- ;Geschwindigkeit: ---Wird Berechnet---" ,10 ,10 ,1000 ,20)
    $timer = 0
    $timer_start = False
    $time = 0

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

    GUISetState() ;Gui Erstellung

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

    While 1

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

    $msg=GUIGetMsg()

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

    If $msg = $GUI_EVENT_CLOSE Then Exit

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

    WEnd

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

    Func _time()

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

    If InetGetInfo($download, 2) = False Then

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

    If InetGetInfo($download,0) > 0 And $timer_start = False Then
    $timer = TimerInit()
    $timer_start = True
    EndIf

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

    $time_calc = int((int(InetGetInfo($download,1)/1024)-(InetGetInfo($download,0)/1024)) _
    /int((InetGetInfo($download,0) / 1024) / (TimerDiff($timer) / 1000)))

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

    $Geschwindigkeit_calc = int(InetGetInfo($download,0) / (TimerDiff($timer) / 1000))

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

    If $time_calc <= 60 Then

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

    If $time_calc = 1 Then
    $time = " 1 Sekunde"
    Else
    $time = $time_calc & " Sekunden"
    EndIf

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

    EndIf

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

    If $time_calc > 60 Then

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

    If int($time_calc/60) = 1 Then
    $time = " 1 Minute"
    Else
    $time = int($time_calc/60) & " Minuten"
    EndIf

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

    EndIf

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

    If $time_calc/60 > 60 Then

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

    If int(($time_calc/60)/60) = 1 Then
    $time = " 1 Tag"
    Else
    $time = int(($time_calc/60)/60) & " Tage"
    EndIf

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

    EndIf

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

    If int($Geschwindigkeit_calc) <= 1024 Then

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

    $Geschwindigkeit = int($Geschwindigkeit_calc) & " Byte/Sekunde"

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

    EndIf

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

    If int($Geschwindigkeit_calc) > 1024 Then

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

    $Geschwindigkeit = int($Geschwindigkeit_calc/1024) & " Kilobyte/Sekunde"

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

    EndIf

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

    If int($Geschwindigkeit_calc/1024) > 1024 Then

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

    $Geschwindigkeit = int(($Geschwindigkeit_calc/1024)/1024) & " Megabyte/Sekunde"

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

    EndIf

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

    If int(($Geschwindigkeit_calc/1024)/1024) > 1024 Then

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

    $Geschwindigkeit = int((($Geschwindigkeit_calc/1024)/1024)/1024) & " Gigabyte/Sekunde"

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

    EndIf

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

    GUICtrlSetData($time_label, "Verbleibende Zeit: " & $time & "; Geschwindigkeit: " & $Geschwindigkeit)

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

    Else
    GUICtrlSetData($time_label, "Verbleibende Zeit: 0 Sekunden ;Geschwindigkeit: 0 Kilobytes/Sekunde")
    Exit
    EndIf

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

    EndFunc

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

    Func _Progress()

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

    GUICtrlSetData($progressbar, int((InetGetInfo($download,0)/InetGetInfo($download,1))*100)) ;aktualiesierung des Progresses
    GUICtrlSetData($kb_and_procent_label ,int(InetGetInfo($download,0)/1024) & " kb von " & int( _
    InetGetInfo($download,1)/1024)&" kb; "&int((InetGetInfo($download,0)/InetGetInfo($download,1))*100)&" % von 100 %") ;aktualiesierung des $$kb_and_procent_labels

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

    EndFunc

    [/autoit]

    Einfach gegoogelt (DllCall kommt von Sprenger120)

    zu deiner Frage mit den Icons:
    - Selbermalen (Ohne Bilder zu verwendet die geschützt sind)
    - nach Seiten googlen die Icons anbieten
    - Icons aus der Shell32.dll benutzen. Sind viele dabei die auch dann zum WindowsStyle passen.

    mfg BB

    "IF YOU'RE GOING TO KILL IT
    OPEN SOURCE IT!"

    by Phillip Torrone

    Zitat von Shoutbox

    [Heute, 11:16] Andy: ....böseböseböseböse....da erinnere ich mich daran, dass man den Puschelschwanz eines KaRnickels auch "Blume" nennt....ob da eins zum anderen passt? :rofl: :rofl: :rofl: :rofl:

    https://autoit.de/index.php?page…leIt#post251138

    Neon Snake

  • Google einfach nach "copyrightfreie Icons" da findest genug Seiten :).

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • Es gibt Seiten ala http://www.famfamfam.com/lab/icons/silk/ von denen man kostenlose Icons ziehen kann. Die jeweiligen Lizenzbestimmunge müssen beachtet werden Bei famfamfam musst du einen Link auf die Seite in dein Skript einbauen:

    Zitat

    License

    I also love to hear of my work being used, feel encouraged to send an email with a link or screenshot of the icons in their new home to mjames at gmail dot com. This work is licensed under a Creative Commons Attribution 2.5 License. This means you may use it for any purpose, and make any changes you like. All I ask is that you include a link back to this page in your credits (although a giant link on every page of your website really isn't needed, contact me to discuss specifics).

    mfg autoBert

  • Hallo AutoItFreak,

    die Adlibs solltest du erst nach der Controlerstellung registrieren. Bei mir kommt es vorher zu Fehlern.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #include <Timers.au3>

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

    DirCreate(@ScriptDir & "\Downloads")

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

    $download = InetGet("http://download.mozilla.org/?product=firefox-6.0.2&os=win&lang=de", @ScriptDir & "\Downloads\test_firefox.de", 1, 1) ;der download
    $gui = GUICreate("Test", 1020, 80)
    DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 0) ; Classic-Style
    $progressbar = GUICtrlCreateProgress(10, 30, 1000, 20)
    GUICtrlSetColor($progressbar, 0x0000FF)
    DllCall('uxtheme.dll', 'none', 'SetThemeAppProperties', 'int', 7) ; Standard-Windows-Style

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

    $kb_and_procent_label = GUICtrlCreateLabel("0 kb von 0 kb; 0 % von 100 %", 10, 60, 1000, 20)
    $time_label = GUICtrlCreateLabel("Verbleibende Zeit: ---Wird Berechnet--- ;Geschwindigkeit: ---Wird Berechnet---", 10, 10, 1000, 20)
    $timer = 0
    $timer_start = False
    $time = 0

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

    GUISetState() ;Gui Erstellung
    AdlibRegister("_Progress", 500)
    AdlibRegister("_time", 500)

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

    While 1

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

    $msg = GUIGetMsg()

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

    If $msg = $GUI_EVENT_CLOSE Then Exit

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

    WEnd

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

    Func _time()

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

    If InetGetInfo($download, 2) = False Then

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

    If InetGetInfo($download, 0) > 0 And $timer_start = False Then
    $timer = TimerInit()
    $timer_start = True
    EndIf

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

    $time_calc = Int((Int(InetGetInfo($download, 1) / 1024) - (InetGetInfo($download, 0) / 1024)) _
    / Int((InetGetInfo($download, 0) / 1024) / (TimerDiff($timer) / 1000)))

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

    $Geschwindigkeit_calc = Int(InetGetInfo($download, 0) / (TimerDiff($timer) / 1000))

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

    If $time_calc <= 60 Then

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

    If $time_calc = 1 Then
    $time = " 1 Sekunde"
    Else
    $time = $time_calc & " Sekunden"
    EndIf

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

    EndIf

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

    If $time_calc > 60 Then

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

    If Int($time_calc / 60) = 1 Then
    $time = " 1 Minute"
    Else
    $time = Int($time_calc / 60) & " Minuten"
    EndIf

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

    EndIf

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

    If $time_calc / 60 > 60 Then

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

    If Int(($time_calc / 60) / 60) = 1 Then
    $time = " 1 Tag"
    Else
    $time = Int(($time_calc / 60) / 60) & " Tage"
    EndIf

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

    EndIf

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

    If Int($Geschwindigkeit_calc) <= 1024 Then

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

    $Geschwindigkeit = Int($Geschwindigkeit_calc) & " Byte/Sekunde"

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

    EndIf

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

    If Int($Geschwindigkeit_calc) > 1024 Then

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

    $Geschwindigkeit = Int($Geschwindigkeit_calc / 1024) & " Kilobyte/Sekunde"

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

    EndIf

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

    If Int($Geschwindigkeit_calc / 1024) > 1024 Then

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

    $Geschwindigkeit = Int(($Geschwindigkeit_calc / 1024) / 1024) & " Megabyte/Sekunde"

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

    EndIf

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

    If Int(($Geschwindigkeit_calc / 1024) / 1024) > 1024 Then

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

    $Geschwindigkeit = Int((($Geschwindigkeit_calc / 1024) / 1024) / 1024) & " Gigabyte/Sekunde"

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

    EndIf

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

    GUICtrlSetData($time_label, "Verbleibende Zeit: " & $time & "; Geschwindigkeit: " & $Geschwindigkeit)

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

    Else
    GUICtrlSetData($time_label, "Verbleibende Zeit: 0 Sekunden ;Geschwindigkeit: 0 Kilobytes/Sekunde")
    Exit
    EndIf

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

    EndFunc ;==>_time

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

    Func _Progress()

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

    GUICtrlSetData($progressbar, Int((InetGetInfo($download, 0) / InetGetInfo($download, 1)) * 100)) ;aktualiesierung des Progresses
    GUICtrlSetData($kb_and_procent_label, Int(InetGetInfo($download, 0) / 1024) & " kb von " & Int( _
    InetGetInfo($download, 1) / 1024) & " kb; " & Int((InetGetInfo($download, 0) / InetGetInfo($download, 1)) * 100) & " % von 100 %") ;aktualiesierung des $$kb_and_procent_labels

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

    EndFunc ;==>_Progress

    [/autoit]

    mfg autoBert