Chibimagic's Weblog

Archive for August 2018

I’m baffled that I had to resort to this convoluted mess for what seems like a pretty common use case, but it’s working now and I’m going to use it.

The problem: I use OmniOutliner and want to be able to quickly toggle whether a row has a strikethrough or not. For bold/italic/underline there’s the normal keyboard shortcuts, but for some reason OmniOutliner has decided not to have “Strikethrough” as an option in the Format menu, which means I can’t assign a keyboard shortcut to it. There used to be a toolbar item that would toggle bold/italic/underline/strikethrough, but it’s no longer there. I’m not sure if they removed the feature or if I lost it when I went from trial to Pro (which makes ZERO sense… why would paying remove a feature?).

Solution part 1: I finally came across “named styles” in the sidebar. I created one called “Done” that adds strikethrough to the current row. Buuuut… toggling named styles is hard coded to F1-F9 keys, and I’m already using those for other things.

Solution part 2: After a bunch of fiddling around, I’ve got the following AppleScript working:

tell application "OmniOutliner" to tell front document
	set doneStyle to item 2 of named styles
	tell selected row 1 to tell styles
		set isDone to false
		repeat with aStyle in named styles
			if id of aStyle is id of doneStyle then
				set isDone to true
			end if
		end repeat
		if isDone then
			remove doneStyle from named styles
		else
			add doneStyle to named styles
		end if
	end tell
end tell

Note: The style happens to be my second named style, and I don’t intend to move it, so I hard coded it. You could use repeat to find a style by name.

Solution part 3: Hook up that AppleScript to Quicksilver for arbitrary triggers (I set mine to command-F2), et voilà! A super quick, suuuuuper simple 3-program solution to something that should have been built in. 🙄



  • None
  • Marketing Consultant: You're an great writer. You have brought up some really interesting insights. Just wanted to say fantastic blogs! I know tons of people see your write
  • optical franchise opportunities: Right now it looks like Wordpress is the preferred blogging platform out there right now. (from what I've read) Is that what you are using on your blo
  • startup speaker: Interesting content. A magnificent article. It is very informative and you are obviously very knowledgeable in this area.

Categories