The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
An Applescript to convert a note to a child row… Thread Tools Search this Thread Display Modes
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
 
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
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
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
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…

Last edited by Cornelius; 2009-01-28 at 02:45 AM..
 
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.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy way to convert note(s) to item(s)? amz1 OmniFocus 1 for Mac 2 2012-06-16 11:46 PM
Append paragraph to task's note via AppleScript waltermundt OmniFocus 1 for Mac 1 2010-07-20 09:29 AM
change parent child task relationship with AppleScript cope360 OmniPlan Extras 2 2009-07-16 11:51 AM
A note to the brave (AppleScript and Betas) Lizard OmniPlan General 0 2007-03-21 01:33 PM
convert safari applescript to omniweb bryanl OmniWeb General 0 2006-11-28 05:18 AM


All times are GMT -8. The time now is 12:22 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.