"Show Groups & Tags" panel -- via applescript or global shor

I want to be able to pop up the Groups & Tags panel when I’m using DEVONagent, so that I can drag a page or result directly to a group in DEVONthink. Is there some way to make a system-wide shortcut to display that panel? Or maybe I can write some applescript to tell DT to pop it up? I was unable to find anything in the dictionary or the scripts folder / web page.

You could use GUI scripting or something like QuicKeys. If DT > Preferences > Import > Destination > Select group is set, then dragging from DA to the DT dock icon will switch focus to DT and open the group selector.

The panel can also be opened via DEVONthink’s Dock menu.

Okay I was able to make some progress with GUI scripting. If I run my script from AppleScript Editor, or I run it by clicking on the script menu in DA and then clicking the script name, it works fine. It switches over to DT, brings up the Groups & Tags panel, and then switches back to DA.

The problem I’m having now is that I can’t get it to work with a keyboard shortcut. I’ve named it properly so I can type Command+Control+Option+G to trigger the script (I’ve also tried other combos, thinking maybe there was a conflict). When I trigger it with the keyboard shortcut, it flashes over to DT as expected, and then comes back to DA. The groups & tags panel doesn’t show up. Any ideas? Here’s my script:

set front_app to path to frontmost application as Unicode text

tell application "System Events"
	tell application "DEVONthink Pro" to activate
	keystroke "g" using {control down, command down}
end tell

tell application front_app to activate

I’ve tried putting a couple delays in there to see if it was just going too quickly, but that doesn’t seem to do anything.

Your script works on my machine. It probably works on yours too. Over here, it opens DT and toggles the panel (closed to open, or open to closed). However the problem you are seeing is that, if the panel is opened from DT it is not available in other apps.

If the panel is opened from the DT dock icon’s contextual menu, it is available in all apps. I’d just open it there when you start your DA session and leave it. :confused:

hrm on my machine the groups and tags panel floats over any windows that are open, even when I open it directly from within DTP using cmd+ctrl+g. shrug I’ll just leave it open when I use DA I guess

The behavior depends on the preference under the General>Interface setting. Check the preference to hide when inactive, and it will be hidden (if opened from DT) in other apps. If the preference is checked and the panel is opened from the Dock menu, the checked preference to hide will be ignored.