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 > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Problems using Scripting Bridge and OmniFocus Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
I'm trying to automate stuff with OmniFocus with the scripting bridge.

It's working, but I'm have problems with creating new projects:

#!ruby

require 'osx/cocoa'

include OSX
OSX.require_framework 'ScriptingBridge'

omnifocus = SBApplication.applicationWithBundleIdentifier_("co m.omnigroup.OmniFocus")

p = { "name" => "Foo" }
Project = omnifocus.classForScriptingClass_("project")
proj = Project.alloc();
proj.initWithProperties_(p);

# this causes a bus error
# proj.get();

# this also causes a bus error
omnifocus.documents()[0].projects().insertObject_atIndex_(proj,0)


I get this error

travis-2:~ mark$ ruby testscript
ruby: unknown type name "item".
/System/Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/oc_wrapper.rb:50: [BUG] Bus Error
ruby 1.8.6 (2007-09-24) [universal-darwin9.0]

Abort trap


What am I doing wrong?
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scripting bridge: crash when trying to get child tasks of a task amorya OmniFocus Extras 8 2013-11-10 05:00 AM
Scripting Bridge & NSColor pixel OmniGraffle General 0 2009-12-07 11:19 AM
Problem Using Scripting Bridge and OmniGraffle pixel OmniGraffle General 1 2009-12-03 08:52 AM
Scripting Bridge & OOP namedStyles oopFan AppleScripting Omni Apps 0 2008-11-03 02:46 PM
Export issue / Modify the selection in a Document via AppleScript / Scripting Bridge Scifer_2008 OmniGraffle General 0 2008-10-08 06:06 AM


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


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