Quickly set tags with mouse/trackpad using Keyboard Maestro and BetterTouchTool

If someone uses BetterTouchTool in addition to Keyboard Maestro, here’s a tip on how you can set tags very quickly and effectively.

By holding down the Shift key I make a mouse tab on the left and get my desired tag inserted.

Here is an example:

Here is the Keyboard Maestro macro for it:

Here is the script from the macro:

-- Append selected tags

tell application id "DNtp"
	try
		set thisSelection to the selection
		set allTags to selected text of think window 1
		if allTags is not "" then
			set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ","}
			
			set theTags to text items of allTags
			set AppleScript's text item delimiters to od
			repeat with theRecord in thisSelection
				set tags of theRecord to (parents of theRecord) & theTags
			end repeat
		end if
	end try
end tell