An Applescript to convert a note to a child row…
Hello
I'm using OmniOutliner with pretty big documents full of notes. In order to export these documents to a database software, I need to convert each notes to a child row. I searched in the Scripts Folder if there was a solution. I didnt find. I do not know how to write a script but I can learn. If someone could help me to do a such script or show me hints, It would be very nice. Thanks for reading. Best regards Cornelius |
How creating a child row and assign it a value
Hi there
I start writing an applescript but i'm not expert so I copy and paste some sample of code. I'm at this point : [CODE]tell application "OmniOutliner Professional" set MyDoc to front document repeat with MyRow in every row of MyDoc if (length of (note of MyRow as string)) > 0 then set MyNote to (note of MyRow as string) make child row of MyRow end if end repeat end tell [/CODE] I dont know how to make a child row and assign him a value. Thanks for helping |
Try this:
[CODE]tell front document of application "OmniOutliner Professional" repeat with MyRow in (every row whose note is not equal to "") set NoteValue to note of MyRow make new child at beginning of children of MyRow with properties {topic:NoteValue} end repeat end tell[/CODE] I think this will create the child row in the correct location all the time |
It works perfectly…
it's great. Thank you Derek. your code is bright. Big Thanks. Now I have to delete the notes, I will try to do it by myself. [CODE]tell front document of application "OmniOutliner Professional" repeat with MyRow in (every row whose note is not equal to "") set NoteValue to note of MyRow make new child at beginning of children of MyRow with properties {topic:NoteValue} end repeat end tell tell application "OmniOutliner Professional" set MyDoc to front document repeat with MyRow in every row of MyDoc if (length of (note of MyRow as string)) > 0 then delete note of MyRow end if end repeat end tell[/CODE] I do it this way in 2 times and it seems to work… I try to put the delete command directly in the first loop but it gets errors… |
One really cool function I discover… It's possible to give your scripts a cool Icon visible from the toolbar of OO by applying to the script himself an icon in the finder.
really cool stuff. |
All times are GMT -8. The time now is 09:27 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.