In-line color chang...
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

In-line color change

4 Posts
3 Users
1 Reactions
452 Views
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 4 years ago
Posts: 132
Topic starter  

Is there a way to do an in-line color change based on status? I want to change the status of the "Smart Status" based on the status.

WMI=active:1,interval:10,text:Physical Drives,color:ffbb77,namespace:rootcimv2,query:Win32_DiskDrive,display:%Caption% [Status: %Status%]| Serial: %SerialNumber% Firmware: %FirmwareRevision%| DeviceID: %DeviceID% Partitions: %Partitions%

I'd like to set "%Status%" to Green if the status is OK, and otherwise set the color of the status to Red, but JUST the variable.


   
Quote
Glenn
(@glenn)
Member Admin
Joined: 7 years ago
Posts: 1438
 

Not at the moment. I can't even think of how one might express it in the ini.


   
ReplyQuote
(@korbikorb)
Active Member Registered
Joined: 9 months ago
Posts: 12
 

Is there any update on this topic ? 

Trying to set the color of a text to be either white or red based on the result of an if statement. 

 

Tried to following workaround:

 

SET my_state_color=#00ff21 (red)


if=... true:success,false:failing,set:my_flag_state=%1,eval:1

SET my_state_color=#ffffffff (white)


text=text:State,display:%my_flag_state%,color:%my_state_color%

 

But not working as epxected. Taking all the time the white color even if the statement is false. 


   
ReplyQuote
(@korbikorb)
Active Member Registered
Joined: 9 months ago
Posts: 12
 

Nevermind, 

got it running by using alarms. 

 

if=... true:success,false:failing,set:my_flag_state=%1,eval:1

text=text:State,display:%my_flag_state%,alarms:(%my_flag_state% contains failing #ff2100)

   
Glenn reacted
ReplyQuote
Glenn's Page