I use rich-text files to take notes in meetings, and apply a style (red color) to text that contains to-dos. Then I label the file (‘To do’), so I can return to it later and easily find the to-dos I assigned myself.
Here’s my workflow:
1 / I highlight the text, open the Styles drop-down menu, and select the style (red text).
2 / Then I select the document, and apply a label using a keyboard shortcut.
What I’d like is:
I highlight the text, and then run a script that applies the style and labels the document.
Does it have to be a script? I do something similar, but I just use the standard OS shortcut system.
E.g. Once you’ve got your style the way you want it (let’s call it ‘Red’), then use system preferences to assign a shortcut to it. You can do the same thing with the label.
So my workflow is, say, select text, ctl-cmd-R, ctl-cmd-3, which is only one fewer shortcuts than a script and easier to set up.
A script that toggles the label is simple, and can be assigned a short cut
(*
20140822. Toggle my label. labels are numbered from 0 [no label] to 7, with 1 through 7 being the colors
set in DEVONthink preferences. Set the labelSet property to value from 1 through 7.
*)
property labelSet : 1
tell application id "DNtp"
if the label of the content record is labelSet then
set the label of the content record to 0
else
set the label of the content record to labelSet
end if
end tell
Style can be given shortcuts in System Preferences > Keyboard > Shortcuts > App Shortcuts. Add your shortcut to the “All Applications” section, such as: