Sign in to follow this  
Followers 0
Ritzelrocker04

SimplyColorProgress...

14 posts in this topic

SimplyColorProgress...

...ist ein einfacher farbiger Fortschrittsbalken der seine Farbe auch bei einem Wechsel des visuellen Stils beibehält. Auch Informationen kann man ihm mitgeben. Aber man ist nicht nur unabhängig von der Farbe. Ebenso ist die Maßeinheit, Prozent, nicht mehr zwingend. So lassen sich genauso die erhaltenen 67 von 70 Punkten optisch aufbereiten. Besonders interessant, ist sicherlich die Flexibilität und die relativ einfache Handhabung. Im Anhang befindet sich eine Demo .

; Author:  Ritzelrocker04 ==> SimplyColorProgress
#include<EditConstants.au3>
#include<GUIConstantsEx.au3>
#include<StaticConstants.au3>
#include<String.au3>

$LW = StringLeft(@ScriptDir,3)
$srcLW = Round((DriveSpaceTotal($LW) - DriveSpaceFree($LW)) / (DriveSpaceTotal($LW) / 100), 0)

#Region ### START SimplyColorProgress GUI section ###
$GUI = GUICreate("SimplyColorProgress by Ritzelrocker04", 400, 300)
$lb = GUICtrlCreateLabel("Festplatte " & $LW, 50, 20, 100, 17)
$implyColorProgressF = GUICtrlCreateInput("II " & 100 - $srcLW & " % frei " & _StringRepeat("I", 100 - $srcLW - 13), 45, 40, 310, 17, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
GUICtrlSetBkColor(-1, 0xFFFBF0)
GUICtrlSetColor(-1, 0x008000); dunkelgruen
$implyColorProgressB = GUICtrlCreateInput("II " & $srcLW & " % belegt " & _StringRepeat("I",$srcLW - 15), 45, 80, 310, 17, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
GUICtrlSetBkColor(-1, 0xFFFBF0)
GUICtrlSetColor(-1, 0xFF0000) ; rot
$lbB1 = GUICtrlCreateLabel("II " & $srcLW & " % " & _StringRepeat("I",$srcLW - 8), 45, 130, 310, 17)
GUICtrlSetColor(-1, 0xFF0000) ; rot
$lbF1 = GUICtrlCreateLabel("II " & 100 - $srcLW & " % " & _StringRepeat("I", 100 - $srcLW - 8), 45, 155, 310, 17)
GUICtrlSetColor(-1, 0x008000); dunkelgruen
$lbB2 = GUICtrlCreateLabel(_StringRepeat("I",$srcLW), 45, 200, 155, 20, $SS_RIGHT)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000) ; rot
$lbF2 = GUICtrlCreateLabel(_StringRepeat("I", 100 - $srcLW), 200, 200, 155, 20)
GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x008000); dunkelgruen
$ButtonOk = GUICtrlCreateButton("&OK", 122, 265, 75, 22, 0)
$ButtonCancel = GUICtrlCreateButton("&Cancel", 203, 265, 75, 22, 0)

GUISetState(@SW_SHOW)
#EndRegion ### END SimplyColorProgress GUI section ###

While 1
    $msg = GUIGetMsg()
    
    Select
        Case $msg = $GUI_EVENT_CLOSE Or $msg = $ButtonCancel
            ExitLoop

        Case $msg = $ButtonOk
            MsgBox(0, "Info über","SimplyColorProgress by Ritzelrocker04", 5)
            ExitLoop
    EndSelect
WEnd

Weiterhin viel Spaß ! :)post-34005-1206873785_thumb.png

Share this post


Link to post
Share on other sites



Translation:

... is a simple colored progress bar that his color also with a change of the visual style maintains. Also information one can give to it. But one is not independent only of the color. Likewise the unit, is no longer compelling per cent. Thus exactly the same the received 67 of 70 points can be prepared optical. Particularly interesting, surely are the flexibility and the relatively simple handling. In the appendix is a demo.

(Not my translation :))

Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites

as google translate, hope some1 can help him

Simply Color Progress ...

... Is a simple colored progress bar of its color even when a change maintains the visual style. Information can him to it. But it is not only independent of the color. Likewise, the unit of measurement percent, no longer mandatory. Sun can be preserved, as are the 67 points of 70 optical activity. Especially interesting is the flexibility and the relatively easy handling. The annex is a demo.


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

he don't want any help !

he posted in the wrong forum :)

must be example scripts

Share this post


Link to post
Share on other sites

WHahahah

funny :)

Share this post


Link to post
Share on other sites

Hi jpam,

ja genau, dass wollte ich auch. Doch leider bekam ich eine Fehlermeldung - "Keine Berechtigung". Warum auch immer?

Danke Dir!

Yes, I wanted that, too. But unfortunately, I got an error message - "No authorization." Why ever?

Thank you!

Ritzelrocker04

Share this post


Link to post
Share on other sites

habe es jetzt noch einmal probiert (siehe Screenshot) !

Have it now again tried (see screenshot)! :)

Ritzelrocker04

post-34005-1206883280_thumb.png

Share this post


Link to post
Share on other sites

maybe you can't have a post in the example forum with current 3 posts


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

ja, also ich hoffe Ihr wisst was ich meine ? Ich wollte Euch nur Informieren !

Yes, so I hope you know what I mean? I just wanted to inform you!

Thank you!

Ritzelrocker04

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

ja, also ich hoffe Ihr wisst was ich meine ? Ich wollte Euch nur Informieren !

Yes, so I hope you know what I mean? I just wanted to inform you!

Thank you!

Ritzelrocker04

right, i understood what you mean then, sorry for being rude Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

Ritzelrocker04

Hi! Interesting solution :)

Share this post


Link to post
Share on other sites

There are many ways to provide multi-color progress, this is one of them:

#include<GUIConstants.au3>
#include<StaticConstants.au3>

Opt("GuiOnEventMode", 1)

$Progress = 0
$hGUI = GUICreate("Test", 400, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$ctrlLabel = GuiCtrlCreateLabel("Progress:  0%", 10, 10, 380, 20, $SS_Center)
$ctrlProgBkgrnd = GUICtrlCreateGraphic(10, 40, 380, 30)
GUICtrlSetBkColor(-1, 0xFF0000) ; Red background
$ctrlProgress = GUICtrlCreateGraphic(10, 40, 1, 30)
GUICtrlSetBkColor(-1, 0xFF) ; Blue progress bar

GUISetState()

While 1
    ; Update progress
    Sleep(250)
    $Progress += 1
    If $Progress > 100 Then ExitLoop
    GUICtrlSetData($ctrlLabel, "Progress:  " & $Progress & "%")
    $iProg = ($Progress / 100) * 380
    GUICtrlSetPos($ctrlProgress, 10, 40, $iProg, 30)
WEnd

Sleep(1000)

Func _Quit()
    Exit
EndFunc

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Hi PsaltyDS,

Deine Lösung hat sogar weniger Includes, gefällt mir balb besser.

Your solution has even less Includes, I like balb better !

So more opportunities more color. :)

RR04

Share this post


Link to post
Share on other sites

@PsaltyDS,

The script, I have with the three colors enlischen something developed and came out with this:

Enjoy!

Das Script habe ich mit den drei enlischen Farben noch etwas weiterentwickelt und rausgekommen ist dabei das hier:

Viel Spaß! :)

#include<GUIConstants.au3>
#include<StaticConstants.au3>

Opt("GuiOnEventMode", 1)

$Progress = 0
$hGUI = GUICreate("Test", 400, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")
$ctrlLabel = GUICtrlCreateLabel("", 10, 10, 380, 20, $SS_Center)
$ctrlProgBkgrnd = GUICtrlCreateGraphic(10, 40, 380, 30)
GUICtrlSetBkColor(-1, 0xFF) ; Blue background
GUICtrlSetColor(-1, 0xFFFFFF) ; weiss Frame
$ctrlProgress = GUICtrlCreateGraphic(10, 40, 1, 30)
GUICtrlSetBkColor(-1, 0xFF0000) ; Red progress bar

GUISetState()

While 1
    ; Update progress
    Sleep(250)
    $Progress += 1
    If $Progress > 100 Then ExitLoop
    GUICtrlSetData($ctrlLabel, "Progress:  " & $Progress & " %")
    $iProg = ($Progress / 100) * 380
    GUICtrlSetPos($ctrlProgress, 10, 40, $iProg, 30)
WEnd

Sleep(1000)

Func _Quit()
    Exit
EndFunc   ;==>_Quit

RR04

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0