We appreciate the contributions many of you have been able to make towards repairing the storm damage and keeping a roof over our heads. With your help we’ve been able to complete much of the critical work. There is still work to be done to secure the house and your continued support will be a huge help.
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.
I call up a monitoring via a Sharepoint list. The values are sent cyclically to a text file
e.g.
Citrix OK
Outlook problem
Intranet error
I would like to color-code the display.
[items]
COMMENT
ITEM=TEXTFILE
FILE=C:\Temp\status5.txt
INTERVAL=5000
COLOR=00FF00;FFFF00;FF0000
MATCH=OK;Problem;error
I am currently getting the error message: “File Info”
what does the text file contents look like?
you want to display 3 lines of the text file, each color coded according to what the lines contain????Here is the txt
Citrix OK
Outlook Problem
Intranet Störung
*or*
display 1 line of the text, color coded according to what the line contains???
All lines. Simply with color difference, depending on the fault status.
Citrix OK
Outlook problem
Intranet error
COLOR=00FF00;FFFF00;FF0000
MATCH=OK;Problem;error
A symbol or traffic light is not possible?
can't help you with the symbols but here's what i came up with:
# retrieve the 3 lines of text FILECONTENTS=interval:10, hidden:1, file:status5.txt, top:1, set:t1=%1 FILECONTENTS=interval:10, hidden:1, file:status5.txt, tail:2, set:t2=%1 FILECONTENTS=interval:10, hidden:1, file:status5.txt, tail:1, set:t3=%1 # choose color of text 1 IF=value1:%t1%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Problem, true:#FFFF00, false:%c1%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Error, true:#FF0000, false:%c1%, set:c1=%1 # choose color of text 2 IF=value1:%t2%, comp:contains, value2:Ok, true:#00FF00, false:%silver%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Problem, true:#FFFF00, false:%c2%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Error, true:#FF0000, false:%c2%, set:c2=%1 # choose color of text 3 IF=value1:%t3%, comp:contains, value2:Ok, true:#00FF00, false:%silver%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Problem, true:#FFFF00, false:%c3%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Error, true:#FF0000, false:%c3%, set:c3=%1 # display 3 lines of text TEXT=interval:10, color:%c1%, text:%t1% TEXT=interval:10, color:%c2%, text:%t2% TEXT=interval:10, color:%c3%, text:%t3%
This assumes the text file contains *only* 3 lines of text. This will set the color of each line depending if the line contains ok, problem or error.
Thankyou!
I still have the problem that the values per line are displayed twice.
I have added a link banner.
Is it also possible to display nothing if the .txt is empty? If it is empty, %1 is currently displayed
CONTROL=3,button-color:#2F2F2F,color:#ffffff,wide:2,left:-240,style:b,width:600,display:Störungsübersicht,uri:microsoft-edge: https://xx.sharepoint.com/sites/xx/Lists/DIAR%20Strungsmanagement/AllItems.aspx # retrieve the 3 lines of text FILECONTENTS=interval:10, hidden:1, file:Status.txt, top:1, set:t1=%1 FILECONTENTS=interval:10, hidden:1, file:Status.txt, tail:2, set:t2=%1 FILECONTENTS=interval:10, hidden:1, file:Status.txt, tail:1, set:t3=%1 # choose color of text 1 IF=value1:%t1%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Problem, true:#FFFF00, false:%c1%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Störung, true:#FF0000, false:%c1%, set:c1=%1 # choose color of text 2 IF=value1:%t2%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Problem, true:#FFFF00, false:%c2%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Störung, true:#FF0000, false:%c2%, set:c2=%1 # choose color of text 3 IF=value1:%t3%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Problem, true:#FFFF00, false:%c3%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Störung, true:#FF0000, false:%c3%, set:c3=%1 # display 3 lines of text TEXT=interval:10, color:%c1%, text:%t1%, style:b TEXT=interval:10, color:%c2%, text:%t2%, style:b TEXT=interval:10, color:%c3%, text:%t3%, style:b
here's a modified version that will not display if status.txt is empty. note the changes to the FILECONTENTS and the use of BEGIN-IF.
showing values twice sounds like the text and display of TEXT are both in use
# retrieve the 3 lines of text FILECONTENTS=interval:10, hidden:1, file:Status.txt, top:1, set:t1 FILECONTENTS=interval:10, hidden:1, file:Status.txt, tail:2, set:t2=%1 FILECONTENTS=interval:10, hidden:1, file:Status.txt, tail:1, set:t3 # choose color of text 1 IF=value1:%t1%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Problem, true:#FFFF00, false:%c1%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Störung, true:#FF0000, false:%c1%, set:c1=%1 # choose color of text 2 IF=value1:%t2%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Problem, true:#FFFF00, false:%c2%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Störung, true:#FF0000, false:%c2%, set:c2=%1 # choose color of text 3 IF=value1:%t3%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Problem, true:#FFFF00, false:%c3%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Störung, true:#FF0000, false:%c3%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:error, true:#FF0000, false:%c3%, set:c3=%1 # display 3 lines of text - display only if status.txt has text BEGIN-IF=value1:[%t1%], comp:ne, value2:[], hidden:1, display:%1 %2 %3 %4 TEXT=interval:10, color:%c1%, text:%t1%, style:b TEXT=interval:10, color:%c2%, text:%t2%, style:b TEXT=interval:10, color:%c3%, text:%t3%, style:b END-IF
@glenn
The Status.txt now only has "Citrix: OK" in it, but is still displayed on all 3 lines and duplicated.
New also with <n/a>
I have now listed all the items:
[items] COLOR=#000001 WMI=:1,text:Modell:,,query:Win32_ComputerSystem,display:%Model% HOST=,text:Hostname: ,display:%1 WMI=:1,text:S/N:,,query:Win32_BIOS,display:%serialnumber% COMMENT # retrieve the 3 lines of text FILECONTENTS=interval:10, hidden:1, file:Status.txt, top:1, set:t1 FILECONTENTS=interval:10, hidden:1, file:Status.txt, tail:2, set:t2=%1 FILECONTENTS=interval:10, hidden:1, file:Status.txt, tail:1, set:t3 # choose color of text 1 IF=value1:%t1%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Problem, true:#FFFF00, false:%c1%, set:c1=%1 IF=value1:%t1%, comp:contains, value2:Störung, true:#FF0000, false:%c1%, set:c1=%1 # choose color of text 2 IF=value1:%t2%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Problem, true:#FFFF00, false:%c2%, set:c2=%1 IF=value1:%t2%, comp:contains, value2:Störung, true:#FF0000, false:%c2%, set:c2=%1 # choose color of text 3 IF=value1:%t3%, comp:contains, value2:OK, true:#00FF00, false:%silver%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Problem, true:#FFFF00, false:%c3%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:Störung, true:#FF0000, false:%c3%, set:c3=%1 IF=value1:%t3%, comp:contains, value2:error, true:#FF0000, false:%c3%, set:c3=%1 # display 3 lines of text - display only if status.txt has text BEGIN-IF=value1:[%t1%], comp:ne, value2:[], hidden:1, display:%1 %2 %3 %4 TEXT=interval:10, color:%c1%, text:%t1%, style:b TEXT=interval:10, color:%c2%, text:%t2%, style:b TEXT=interval:10, color:%c3%, text:%t3%, style:b END-IF
Maybe you have another idea
zip up your entire ini file and post it for me
