DT Pro: Where are Categories?

I downloaded a copy of the latest DT Pro Beta, and I was wondering where Categories are. The feature gets mentioned on the DT version comparison chart, but I can’t find it in the program. Has it not been implemented yet? Or Im’ I just missing it? Thanks.

Doug

They are not yet implemented. We’ll do this after the public beta release.

Best,

Eric.

Bonjour,

#1 : categories still seem not to be available in DTpro 1.0 or am I mistaken ?

#2 : is it possible to assign the same comment to multiple items in 1 move ?

#3 : is it possible to do that when there are already pre-existing comments without deleting them ?

NB : I intend assigning multiple keywords, ie, categories to each item through the comments column and I cannot do it otherwise if there is no specific category column… cf.supra

Thanks for your help

No, unfortunately not. They didn’t make it into 1.0 as we tried not to miss the published release date.

Not with the factory equipment, but you could write an AppleScript for doing that…

As said: Should be, with some AppleScript magic.

Best,

Eric.

These scripts have already been swapped on the forum here, and will be useful for what you have requested:

Add to Comments Field (this will add text to all the Comments field in all selected docs, it will not delete what is there):


using terms from application "DEVONthink Pro"
	tell application "DEVONthink Pro"
		activate
		
		try
			set this_selection to the selection
			if this_selection is {} then error "Please select some contents."
			
			repeat
				display dialog "Enter the comment to use:" default answer "" buttons {"Cancel", "OK"} default button 2
				set suffix to the text returned of the result
				if suffix is not "" then exit repeat
			end repeat
			
			repeat with this_item in this_selection
				set current_comment to the comment of this_item
				set new_item_comment to current_comment & suffix
				set the comment of this_item to new_item_comment
			end repeat
		on error error_message number error_number
			if the error_number is not -128 then
				display dialog error_message buttons {"OK"} default button 1
			end if
		end try
	end tell
end using terms from

Delete Comments Field (if you need to start afresh, this will delete all text in the Comments field of all selected docs):


using terms from application "DEVONthink Pro"
	tell application "DEVONthink Pro"
		activate
		
		try
			set this_selection to the selection
			if this_selection is {} then error "Please select some contents."
			
			display dialog "You are about to delete all contents in the Comments field, this cannot be undone.  Are you sure?" buttons {"Cancel", "OK"} default button 2
			
			repeat with this_item in this_selection
				set the comment of this_item to ""
			end repeat
		on error error_message number error_number
			if the error_number is not -128 then
				display dialog error_message buttons {"OK"} default button 1
			end if
		end try
	end tell
end using terms from

Thank you very much for your replies.

I have just tried the first script, which works fine, except for one small problem : successive keywords are “glued” together.

So, I tweaked the script : set new_item_comment to current_comment & suffix & " ".

It seems to work. But is it correct ? You might say I did that blindfolded, having no experience whatsoever in Applescript.

Btw, it is very useful. Thanks again

Glad they could help. Yes, the keywords are “glued” together, which could be useful if you want them to be for some reason, or if you want the ability for them to be separated by something other than a default character. In the original script, to separate them you just have to add, in front of the new word, a space, or a comma and space, or whatever separator you want.

I can’t tell you if your tweaked script is correct or not, as I don’t know AppleScript either. The first script was posted by someone else on the forum awhile back, and then the second one I created by modifying the first one, just like you – “blindfolded”. :slight_smile: I figure, if it works, then it’s probably fine. Another scripter can respond to your question more accurately though…