Selecting through applescript, what changed?

That code used to work, I heavily use it, yet no more since 3.9.4. It hangs at select theGroup , with select command which indeed can’t be found (anymore) in the applescript dictionnary.

What changed? How to adapt it?

on run
	tell application id "DNtp"
		set theRecords to selected records
		set firstRecord to first item of theRecords
		add custom meta data "article" for "type" to firstRecord
		set theGroup to create record with {name:(get name of firstRecord), type:group} in current group
		set exclude from see also of theGroup to false
		set exclude from classification of theGroup to false
		set exclude from tagging of theGroup to true
		add custom meta data "article" for "type" to theGroup
		move record theRecords to theGroup
		select theGroup
	end tell
end run

Would perhaps open tab or open window come close to what you did before with select?

Actually there was never a select command in DEVONthink’s script suite but there’s a selection window property which can be set.

1 Like

@chrillek oh indeed, my very bad. That was a line of code I started workin on, then forgot about, then got back on it and assumed there had been a change in the system, not in my code. Luckily you and git proved my wrong. Sorry for that.