Exclude files via Smart Rule?

Hi, I would like to exclude certain file formats from search, from “see also” and from wiki linking. Basically everything that is not PDF or ePub should be ignored. Via right mouse button → information → ignore at… you can set this manually for individual files. Unfortunately I can’t find anything similar as an action under Smart Rules.

Does anyone have an idea how to proceed here?

Kind regards

It has been settled in the meantime. User pete31 showed me the following script which solves my issue.

-- Smart Rule - Exclude from see also and Exclude from Wiki linking

on performSmartRule(theRecords)
	tell application id "DNtp"
		try
			repeat with theRecord in theRecords
				set exclude from see also of theRecord to true
				set exclude from Wiki linking of theRecord to true
			end repeat
			
		on error error_message number error_number
			if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
			return
		end try
	end tell
end performSmartRule

A shorter version of this script:

on performSmartRule(theRecords)
	tell application id "DNtp"
		repeat with theRecord in theRecords
			tell theRecord to set {exclude from see also, exclude from Wiki linking} to {true, true}
		end repeat
	end tell
end performSmartRule