Clean Up from AppleScript/JavaScript in OF3

I have a script which toggles a tag Active vs On Hold, but the changes don’t always take effect until I run Clean Up. However, I can’t find a way to automate running that. Is there a way to do that?

Looks like compact might be what you’re looking for. For example:

tell application "OmniFocus"
	tell default document
		compact
	end tell
end tell
1 Like

That’s exactly what I needed! Thanks!