Hi,
I’m trying to catch an edge condition where an outline has had all its rows deleted. I am unable to fathom how my Applescript can add a new row. I have tried may different ways but all have failed.
Any ideas welcomed.
Here is a code snip :
try
– Record the position of the selected row
set tSelectedRow to last selected row of tDocument
on error
– ‘last selected row’ will raise an error if there are zero selected rows; add the
– new rows at the top level in this case
--set tSelectedRow to make new row at (begining of every row) --**FAILS**
make new row ?????
end try
tell application "OmniOutliner"
set oDoc to first document of it
set oRow to make new row with properties {topic: "Hello World"} at end of rows of oDoc
return oRow
end tell
unlocked2412 - many many thanks for your code snip : I added it to my outline of really useful Applescript and the script I have been working on. I’m kicking myself because I tried a very similar syntax which I think use to work in OO3 but did not specify where the row should be created so obviously it failed.