The Default Add Favorite button is set to simply pop up the ADDDIALOG, which is ok, but we can do better!
Here's a replacement that will add ALL SELECTED files and folders as favorites, or, if nothing is selected, will revert to the previous behaviour and simply display the ADD dialog
to use, copy the below xml chunk, Right-click in an empty space in a Dopus toolbar, click "Customize" and then right click a toolbar and choose PASTE
<?xml version="1.0"?>
<button backcol="none" display="both" hotkey="ctrl+D" label_pos="right" textcol="none">
<label>Add To Favorites \t Ctrl + D</label>
<icon1>#favoritesadd</icon1>
<function type="script">
<instruction>@script VBScript</instruction>
<instruction>Option Explicit</instruction>
<instruction>Function OnClick(ByRef clickData)</instruction>
<instruction> clickData.func.command.deselect = false ' Prevent automatic deselection</instruction>
<instruction />
<instruction> If clickData.func.sourcetab.selected.count = 0 Then</instruction>
<instruction> clickData.func.command.RunCommand "Favorites ADDDIALOG"</instruction>
<instruction> Else</instruction>
<instruction> clickData.func.command.RunCommand "Favorites ADD PATH={filepath$}"</instruction>
<instruction> End If</instruction>
<instruction>End Function</instruction>
</function>
</button>