The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   AppleScripting Omni Apps (http://forums.omnigroup.com/forumdisplay.php?f=46)
-   -   Applescripting Text Attachments? (http://forums.omnigroup.com/showthread.php?t=12905)

Charles Turner 2009-06-29 11:54 AM

Applescripting Text Attachments?
 
2 Attachment(s)
Hi-

I'm a newbie to Omnioutliner 3, using the Beta 4 release. I had a question about manipulating Text Attachments with Applescript. First off, I'm assuming that a Text Attachment is the button displayed in the screen grab below:

[IMG]http://forums.omnigroup.com/attachment.php?attachmentid=967&stc=1&d=1246305133[/IMG]

When I try to "explore" these in Script Debugger or "get" them via a script, I get some variant of:

[IMG]http://forums.omnigroup.com/attachment.php?attachmentid=968&stc=1&d=1246305450[/IMG]

Anyone know whether I'm having trouble with OO3, my knowledge of Applescripting and OO3, and/or Script Debugger and OO3?

Many thanks, Charles

whpalmer4 2009-06-29 11:56 AM

How about sending along your code so we can have a look?

Charles Turner 2009-06-29 07:37 PM

Well, here you go:

tell application "OmniOutliner Professional"
get file name of text attachment 1 of text 1 of cell 2 of leaf 1 of document 1
end tell

Thanks for your interest!

Charles

RobTrew 2009-06-29 11:42 PM

Ken Case's recent posting on [URL="http://forums.omnigroup.com/showthread.php?t=9693"]this thread[/URL] may be relevant.

Charles Turner 2009-06-30 04:52 AM

Hi Rob-

Thanks for the pointer, but I think OmniOutliner handles things a bit differently. AFAIK, there isn't any "link" attribute to a style in OO3.

I have gotten a bit farther on my own, very crude, this snippet will write the text, but the file name isn't recognized:

[CODE]
set f1 to POSIX file "/Users/cturner/Desktop/212 project list.txt"

tell application "OmniOutliner Professional"
tell document 1
tell row 1
tell cell 2
tell text 1
make new text attachment with properties {file name:f1, text:"deadbeef"} at after word 5
end tell
end tell
end tell
end tell
end tell
[/CODE]

So, still looking for knowledge!

Thanks again, Charles

Ken Case 2009-06-30 06:13 AM

Sorry, OmniOutliner 3 doesn't support scripting attachments yet; we plan to add that support for OmniOutliner 4 (based on the work we've done in OmniFocus).

Charles Turner 2009-06-30 07:13 AM

That's fine. Thanks for the quick clarification!

Best, Charles


All times are GMT -8. The time now is 02:55 AM.

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