2022.12.07
Marker for file highlighting like in Colors > File types, but "on the fly": add selected color, delete or change. So you can use this scripts for file tagging. You can use any number of colors.
Written on Lua, see Lua scripting > DLL required.
Two parts:
marker.lua- for button(s): adding, deleting or changing color for selected files;markerwdx.lua- WDX-plugin.
NOTE: The scripts use os.setenv(), so for DC <= 1.0.10, use previous versions.
List of marked files is stored in a file named marker.txt near marker.lua and markerwdx.lua. This is a plain text file (UTF-8 without BOM), so you can also edit its contents manually.
About color format: You can use any format, but format RGB is more easy for color settings editing and I use it for example.
Below I will use Purple as 128,0,128.
How to use toolbar: Toolbar. (Menu is more useful, see note below.)
Use internal command cm_ExecuteScript and the following parameters:
Adding or changing color for selected files
path/to/marker.lua
--add
%LU
128,0,128
where
-
%LUis the list of selected files, see Variables in parameters; -
128,0,128- color in selected format.
Deleting color for selected files
path/to/marker.lua
--del
%LU
Go to Configuration > Options... > Plugins > Plugins WDX > Add > choose markerwdx.lua, go to Colors > File types and add new:
-
press
Addand writeCategory name; -
Category mask: press buttomTemplates...>Define...> go to tabPlugins; -
choose
Use content plugins, combine with:andAND (all matches); -
add rule:
plugin:markerwdx
field:Color
operator:=(case)
value:128,0,128 -
press
Save; -
choose template name, now
Ok; -
now choose color in
Category color: press button>>and write
red:128
green:0
blue:128 -
press
Apply(both).
NOTE: You must add buttons and file types (step 1 and step 3) for ALL desired colors!
NOTE: Maybe you will need to update file list (press Ctrl+R or go to the parent folder and return back).