[Q] Colouring a progress bar (many conditions)

Search This thread

teteu86

Senior Member
Sep 22, 2012
209
22
Hi. I have the following working code to colour a progress bar:
Code:
[cf]$#BLEVN#<20?ffec1818$$#BLEVN#>=20 && #BLEVN#<50?ffdfec1c$$#BLEVN#>=50?ff36e057$[/cf]

And I am trying to add another condition (priority):

Code:
#BSTATN#=2:ff50e4ff

But I can't put an if inside of another, I've tried many ways (apparently all wrong).

Would you give me a hand?

The objective is: colour if charging. if not charging, colour according to the bat level.
 
  • Like
Reactions: ma11en

kwerdenker

Senior Member
Apr 1, 2010
1,451
2,533
Probably the Zooper Forums
Hi. I have the following working code to colour a progress bar:
Code:
[cf]$#BLEVN#<20?ffec1818$$#BLEVN#>=20 && #BLEVN#<50?ffdfec1c$$#BLEVN#>=50?ff36e057$[/cf]

And I am trying to add another condition (priority):

Code:
#BSTATN#=2:ff50e4ff

But I can't put an if inside of another, I've tried many ways (apparently all wrong).

Would you give me a hand?

The objective is: colour if charging. if not charging, colour according to the bat level.

I did something similar for another user here. That was about text display but the general idea on how to combine two different conditions is the same. You should be able to adapt the code posted in the linked post to your situation without much of a problem :)
 
  • Like
Reactions: teteu86

teteu86

Senior Member
Sep 22, 2012
209
22
I did something similar for another user here. That was about text display but the general idea on how to combine two different conditions is the same. You should be able to adapt the code posted in the linked post to your situation without much of a problem :)

Thank you. I leave the code in the case someone searches for it.

Code:
[cf]$#BSTATN#=2?ff50e4ff$$#BLEVN#<20 && #BSTATN#!=2?ffec1818$$#BLEVN#>=20 && #BLEVN#<50 && #BSTATN#!=2?ffdfec1c$$#BLEVN#>=50 && #BSTATN#!=2?ff36e057$[/cf]
 
  • Like
Reactions: polstein and ma11en

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I did something similar for another user here. That was about text display but the general idea on how to combine two different conditions is the same. You should be able to adapt the code posted in the linked post to your situation without much of a problem :)

    Thank you. I leave the code in the case someone searches for it.

    Code:
    [cf]$#BSTATN#=2?ff50e4ff$$#BLEVN#<20 && #BSTATN#!=2?ffec1818$$#BLEVN#>=20 && #BLEVN#<50 && #BSTATN#!=2?ffdfec1c$$#BLEVN#>=50 && #BSTATN#!=2?ff36e057$[/cf]
    1
    Hi. I have the following working code to colour a progress bar:
    Code:
    [cf]$#BLEVN#<20?ffec1818$$#BLEVN#>=20 && #BLEVN#<50?ffdfec1c$$#BLEVN#>=50?ff36e057$[/cf]

    And I am trying to add another condition (priority):

    Code:
    #BSTATN#=2:ff50e4ff

    But I can't put an if inside of another, I've tried many ways (apparently all wrong).

    Would you give me a hand?

    The objective is: colour if charging. if not charging, colour according to the bat level.
    1
    Hi. I have the following working code to colour a progress bar:
    Code:
    [cf]$#BLEVN#<20?ffec1818$$#BLEVN#>=20 && #BLEVN#<50?ffdfec1c$$#BLEVN#>=50?ff36e057$[/cf]

    And I am trying to add another condition (priority):

    Code:
    #BSTATN#=2:ff50e4ff

    But I can't put an if inside of another, I've tried many ways (apparently all wrong).

    Would you give me a hand?

    The objective is: colour if charging. if not charging, colour according to the bat level.

    I did something similar for another user here. That was about text display but the general idea on how to combine two different conditions is the same. You should be able to adapt the code posted in the linked post to your situation without much of a problem :)