Quick column choice needed

One of the very few annoyances of DT is when I have a new object open in a window and the window contains a ton of columns I don’t want, and misses one or two that I do want.

I have to right-click columns or use the View→List Columns a lot of times to get it the way I want because - annoyance #2 - the column list closes each time I click on a column to remove or add one.

Three solutions come to mind:

  • a persistent list that I can work on to choose columns and then close (like the Finder has, for instance). Or the possibility to option-click an item in the column choice menu to make it stay open and click something else.
  • a way to save the layout of a window, either as a copy action or a template, so that I can paste or apply my preferred column set to a window
  • A preference setting for the columns I want in a fresh window.

Apologies if something like that already exists, but i couldn’t find anything of the sort.

4 Likes

Agree that it is one of the few things that DT can improve - sticky columns, potentially even per database, etc. In the meantime I did create an applescript for that, if you’re interested.

3 Likes

@uimike I’m interested in that script. Thanks.

1 Like

Hm, stopped working - let me debug it.

Very interested, thanks!

Applescript is my go-to when things don’t work the way I want them to, but in this case I didn’t see how it could be done.

Thanks for the suggestions, this is planned for a future releases.

5 Likes

I had this, but it stopped working, after DT4 (or some else I did). When I ran it, it would send keycodes and turn some columns on (I am trying to remember why S,B,T, etc turned on a specific column, but I can’t replicate…)

tell application id "DNtp"
	set theKeyCodes to {"S", "B", "T", "K", "M"}
	repeat with aCode from 1 to length of theKeyCodes
		tell application "System Events" to keystroke (item aCode of theKeyCodes) using {option down, shift down, command down}
		delay 1
	end repeat
	tell application "System Events"
		key code 103 using command down
	end tell
end tell
```

1 Like

Out of pure curiosity, I used DT’s AI-guided scripting and got this (prompt was “Turn column “Kind” on)

tell application "System Events"
	tell process "DEVONthink"
		set frontmost to true
		
		-- Click View menu
		click menu bar item "View" of menu bar 1
		
		-- Click Columns submenu
		click menu item "Columns" of menu "View" of menu bar item "View" of menu bar 1
		
		-- Click Kind to toggle it on
		click menu item "Kind" of menu "Columns" of menu item "Columns" of menu "View" of menu bar item "View" of menu bar 1
	end tell
end tell
```

Doesn’t work, I am not surprised. I guess the old “click menu bar” has died a long time ago?

DEVONthink 4’s script assistant doesn’t support user interface scripting which we usually do not recommend. It’s prone to failure, e.g. after updates or when using different localizations. Apart from that the name of the menu is now List Columns, not Columns.

1 Like

A strong argument for comments in code :wink:

3 Likes

Yep, I’m not surprised it wasn’t working anymore, it was a hack from the start :slight_smile:

I’m happy the columns enhancement is in the oven!

Christian, I have to start slapping myself when I don’t add comments. At least it’s not overloaded fields from 1970’s Cobol :slight_smile:

But yes, I’ll monitor myself.

2 Likes

Be sure to start that comment in column seven :wink:

1 Like

Auch ich vermisse eine konstante Einstellmöglichkeiten dazu sehr. Es ist sehr aufwendig, die Listenspalten immer wieder in vielen einzelnen Schritten einstellen zu müssen. Eine dauerhafte Auswahl dazu fehlt mir sehr.

:laughing: (Re. COBOL)

Or LISP!

Though scripting DEVONthink in LISP would be sorta cool, I won’t hold my breath.

2 Likes