Hello. I’m trying to make a row with a level property, so that its indentation is correct. I’m essentially trying to make children by using levels.
The first script below returns “OmniOutliner got an error: AppleEvent handler failed.”
make new row at end of children of last row of front document with properties {topic:note_text, level:2}
Here’s the whole thing:
set {fav1, fav2, fav3, fav4, fav5, fav6} to favorite colors
if rgba is fav1 then
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of rows of front document with properties {topic:note_text}
else if rgba is fav2 then
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of children of last row of front document with properties {topic:note_text}
else if rgba is fav3 then
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of children of last row of front document with properties {topic:note_text}
else if rgba is fav4 then
try
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of children of last row of front document with properties {topic:note_text}
on error
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of rows of front document with properties {topic:note_text}
end try
else if rgba is fav5 then
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of children of last row of front document with properties {topic:note_text}
else if rgba is fav6 then
tell application id "com.omnigroup.OmniOutliner4" to make new row at end of children of last row of front document with properties {topic:note_text}
end if