highlight the line where I have the cursor

Hello there,

I would like to highlight lines in different colors. Now The manual steps are:

1 triple-click so I select the whole line
2 select the highlight color
3 highlight

It would be possible to automate this and asign a keystroke for each color?

I have search about select the whole line but I only found information related to caracters, words and paragraphs.

Is it posible to applescript the highlight property?

Thank you very much for your time

Paragraphs are basically lines with a carriage return/line feed at the end. Here’s a demo script using a different background color for each paragraph:

tell application "DEVONthink Pro"
	tell text of think window 1
		set theCnt to number of paragraphs
		set i to 0
		repeat with thePara in paragraphs
			set theColor to ((i * 65535) / theCnt) as integer
			set background of thePara to {0, theColor, 0}
			set i to i + 1
		end repeat
	end tell
end tell