In-line color chang...
 
Notifications
Clear all

In-line color change

4 Posts
3 Users
1 Reactions
246 Views
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 4 years ago
Posts: 131
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: 6 years ago
Posts: 1322
 

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


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

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: 4 months ago
Posts: 9
 

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