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 > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Dealing With Selected Rows / Cells Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I am playing with putting things into OO4 via applescript. Please note that I am new to apple scripting.

This script does more or less what I want:

Code:
tell application "OmniOutliner"
	set MyDoc to front document
	set myText to "Hello World!"
	-- set the note of selected row to myText
	set note of selected rows of MyDoc to myText
	-- set the cell of selected row to myText
	set topic of selected rows of MyDoc to myText
	
	set curRow to selected rows of MyDoc
end tell
Still, a few questions remain:
- is it correct to set the "topic" of a row to the text (or is there another way)
- in my current document, for a selected row, I get for example

Code:
{child 2 of child 1 of child 2 of document id "aGFw5TYjAVs" of application "OmniOutliner"}
- this is wonderful, because this contains the number that I seem to need: 2+1+2, which is the ID of the current row, which I seem to need when I want to add an attachment (as the ID of the row in this example script)
-- is this the way to get to this ID, or are there other ways? I played with

Code:
set rowInd to index of first selected row of myDoc
set rowDepth to level of first selected row of myDoc
but I wasn't successful.
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 04:21 AM.


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