Jump to content

Progressbar Vertical


JRSmile
 Share

Recommended Posts

Hi there, is it possible to make a progressbar show vertical, i want to make an cpu Usage history and i think it is possible with ca. 200 progressbars with vertical order in one line. or do you know another way?

I haven't found any parameters in the forum so far, but keep searching...

kind regards,

JR

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

Hi there, is it possible to make a progressbar show vertical, i want to make an cpu Usage history and i think it is possible with ca. 200 progressbars with vertical order in one line. or do you know another way?

I haven't found any parameters in the forum so far, but keep searching...

kind regards,

JR

Look at style $PBS_VERTICAL


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

this is exactly what i want, thx, i saw it in another post but was a bit worried about the code around.

i see it is even in the manual .... sorry thread closed because of stupidness of the author

Edited by JRSmile
$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

this is exactly what i want, thx, i saw it in another post but was a bit worried about the code around.

When I want to know if something like that is possible I try it in Koda.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

k thx, this is a nice tip.

EDIT: Koda has not the feature to remove the border of the prgress bar, is it possible?

what i want is a one pixelwide progressbar , i have made a little example here:

#include <GuiConstants.au3>
#include <array.au3>
; GUI
GuiCreate("Progress History Sample GUI", 400, 200)
Dim $aList

$aList = _ProgHisInit(0,0,400,200,0x000000,0x00FF00)

; GUI MESSAGE LOOP
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
    $test = _ProgHisSet(Random(1,100,1),$aList)
         sleep(100)
Wend


; PROGRESS HISTORY INIT
func _ProgHisInit($x,$y,$width,$hight,$bgcolor = 0x000000,$color = 0x00FF00)
    $list = ""
    for $i = 1 to $width step 2
        $list &= "|" & GuiCtrlCreateProgress($x + $i, $y, 3, $hight,$PBS_VERTICAL + $PBS_SMOOTH)
        GUICtrlSetBkColor(-1,$bgcolor)
        GUICtrlSetColor(-1,$color)
    next
    $aList = StringSplit($list,"|")
    return $aList
EndFunc ;==>_ProgHisInit
´

;PROGRESS SET
func _ProgHisSet($val,$aList)
    Dim $List,$bList
    for $i = 1 to $aList[0]
        $List &= "|" & GUICtrlRead($aList[$i])
    Next
    $bList = StringSplit($List,"|")
    _ArrayPush($bList,$var)
    for $i = 1 to $aList[0]
        GUICtrlSetData($aList[$i],$bList[$i])
    Next
EndFunc ;==>_ProgHisSet

the script has a small error, it doesn't work :P

Because of some kind of reason it can't find my _ProgHisSet() function if i call it. already tested it to call it at different positions in the code and changed the name, would somebody be so kind and tell me where the error is.

Edited by JRSmile
$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
Share on other sites

I have commented the changes

It now sees your functions, not sure if the prog works as a whole though

only you can tell.

You had an odd char blocking the parser seeing the func

HTH HardCopy

#include <GuiConstants.au3>
#include <array.au3>
; GUI
GuiCreate("Progress History Sample GUI", 400, 200)
Dim $aList

$aList = _ProgHisInit(0,0,400,200,0x000000,0x00FF00)

; GUI MESSAGE LOOP
GuiSetState()
While GuiGetMsg() <> $GUI_EVENT_CLOSE
    $test = _ProgHisSet(Random(1,100,1),$aList)
         sleep(100)
Wend


; PROGRESS HISTORY INIT
func _ProgHisInit($x,$y,$width,$hight,$bgcolor = 0x000000,$color = 0x00FF00)
    $list = ""
    for $i = 1 to $width step 2
        $list &= "|" & GuiCtrlCreateProgress($x + $i, $y, 3, $hight,$PBS_VERTICAL + $PBS_SMOOTH)
        GUICtrlSetBkColor(-1,$bgcolor)
        GUICtrlSetColor(-1,$color)
    next
    $aList = StringSplit($list,"|")
    return $aList
EndFunc;==>_ProgHisInit

;;; <--- you had an odd " ' " character here 

;PROGRESS SET
func _ProgHisSet($var,$aList);<---- changed $val to $var
    Dim $List,$bList
    for $i = 1 to $aList[0]
        $List &= "|" & GUICtrlRead($aList[$i])
    Next
    $bList = StringSplit($List,"|")
    _ArrayPush($bList,$var)
    for $i = 1 to $aList[0]
        GUICtrlSetData($aList[$i],$bList[$i])
    Next
EndFunc;==>_ProgHisSet

Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad

Link to comment
Share on other sites

kind regards HardCopy

$a=StringSplit("547275737420796F757220546563686E6F6C75737421","")
For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4)
Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI"
Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile;
MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...