I'm a bit late on this thread, but I tried something similar several months ago. I wrote a small utility to move windows around multiple screens. I found it was pretty straight forward to create an objective-c class that did all of the interactions with the Accessibility API and then subclass that with a Ruby class for all of the other logic.
The project itself is up at http://github.com/andrewwillis/windowmover/tree/master. The objective-c class that interacts with the Accessibility API is WWFrontWindow.[h|m] and the corresponding subclass is front_window.rb I doubt the project itself is of much use to anyone but me, but I hope the classes can help you get the interaction with the Accessibility stuff you are looking for. -Andrew On Thu, Apr 2, 2009 at 8:08 AM, Benjamin Mollenhauer <benjaminmollenha...@googlemail.com> wrote: > Hi, > > i tried unsuccessfuly to use functions like "AXUIElementCopyAttributeValue" > from the Accessibility API. > >> >> /System/Library/Frameworks/ApplicationServices.framework/‍Frameworks/HIServices.framework/ > > If I include "framework 'ApplicationServices' it seems, that I have no > access to these functions. > I read http://www.macruby.org/trac/wiki/MacRubyTutorial and stumbeld upon > Accessing Static APIs and some thing called gen_bridge_metadata. My efforts > with this tool resulted in some compiler errors. > Third option would be to make some Obj-C wrapper. > > Which is the right way to go? > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel > _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel