I’m seeking assistance for setting up scripts to automate certain functions in OmniOutliner. I’m using MarginNote, an app that annotates documents and exports those annotations as discrete notes, to export those annotations in OmniOutliner. The wonderful folks at OmniGroup have helped me build scripts that neaten up the formatting for MarginNote-exported - OmniOutliner files.
I’m seeking a script that can change the formatting for the URL links in the Page No column, which appear like this…
Select a row you wish to affect and run this applescript:
tell application "OmniOutliner"
set c5 to a reference to cell 5 of selected row of document 1
set l5 to value of attribute "link" of style of character -1 of text of c5
set text of c5 to l5 as text
end tell
Breakdown:
Identify the target cell of the selected row (NB ‘Topic’ column is actually ‘2’ so in your example, ‘Page No’ is ‘5’)
Grab the URL from the last character of that cell
Replace cell text with that URL (NB ‘as text’ may not be required)