Jon Directory Opus developer 1 Jan 9, 2019: Here's a simple script that adds a name length column. Install it by copying the file to the /dopusdata/Script AddIns folder.
Hi Jon, can you please tell me the variable I can use in this script to specify the COLOR of (all in all) ALL numbers displayed in this column (which you can usually set under -> Preferences -> Display -> Fields, but the column from the script is not visible here). So e.g. to set ALL values in the column are shown with the color red)?
Thx. a lot
I thought you could do this, but having looked I don't think you can. Only script columns that display graphs can define their colors. Script columns which display text values can only use the standard colors, as far as I can see:
O.K. Leo & thanks for the link. I tried "graph_colors" (and "push_back()"), but I get the content of the column displayed completely white ...
Since I'm not a programmer: Could you write me (only) one/two line/s for the script to show something of the column-content in color (means other like the other columns), plz?
Thanks a lot
I only want the information (which is a number of the length of the name) to be highlighted in color (preferably in a fixed font). In the link I only found 'graph_colors' regarding colors ... an "col.label" has a different meaning than the standard "labels", namely it means the name of the column, so I can't set the color of an predefined (standard) labels ...
My script is:
option explicit
Function OnInit(initData)
initData.name = "NameLength"
initData.version = "1.0"
initData.copyright = "(c) 2019 jpotter"
' initData.url = "https://resource.dopus.com/viewforum.php?f=35"
initData.desc = "Displays filename length"
initData.default_enable = true
initData.min_version = "12.0"
Dim col
Set col = initData.AddColumn
col.name = "Namensslänge"
col.method = "OnNameLength"
col.label = "Namensslänge"
col.justify = "right"
col.autogroup = true
col.type = "number"
col.namerefresh = True
End Function
' Implement the NameLength column
Function OnNameLength(scriptColData)
scriptColData.value = Len(scriptColData.item.name)
End Function