Keyboard Macros for Tagging from the Search Window

For the Search WIndow. Unpredictable on any other window. :wink:

You’ll want to assign these to some key presses. Right now, I have “Focus to tag bar” set to Control-command-B, and “Focus to Results” set to Control-command-R. At first thought, these seemed to fit in with the Control-command-arrow keys that move through the highlighted results.

The “Focus to tag bar” has a small delay, and then sends a Command-right arrow. You might want to fiddle with, or eliminate this.

Enjoy!

“Focus to tag bar” ```

tell application “System Events”
tell process “DEVONthink Pro Office”
set focused of text field 1 of splitter group 1 of window 1 to true
delay 0.3
keystroke (ASCII character 29) – right arrow key
end tell
end tell

"Focus to Results" ```

tell application "System Events"
	tell process "DEVONthink Pro Office"
		set focused of scroll area 1 of splitter group 1 of window 1 to true
	end tell
end tell

Here’s another: In the Search Window, a document is positioned at the first hit, which can be really deep into the content. Often, I’m more interested in the title when I’m tagging, so this key command scrolls the current document to its top. Try Control-command-U for “Up”

(By the way, all these are UI scripts, and require “assitive” whatever to be enabled in the System Preferences.)


tell application "System Events"
	tell process "DEVONthink Pro Office"
		set value of value indicator 1 of scroll bar 1 of scroll area 1 of splitter group 1 of group 2 of splitter group 1 of window 1 to 0
	end tell
end tell

Great!!