[MacRuby-devel] MacRuby scripting bridge speed
fatste at gmail.com
Fri Dec 16 07:17:00 PST 2011
I'm new to all this, so apologies if I'm doing something daft.
I'm trying to create a MacRuby GUI application to parse a load of
information from InDesign documents.
I've previously made this application using applescriptObjC, but I was
constantly bouncing off the walls of applescript and getting seemingly
random bad_exec errors if I ran it too many times without a reboot, so
I've decided to try with MacRuby.
I'm only at the stage of probing MacRuby to see how to do it, and I've
immediately hit a problem; it seems to take a very long time to set up
the link to InDesign.
I found some code in correspondence between Matt Aimonetti and Spencer
Rose that I am using to test:
# I followed Matt's instructions for making the bridge support file, but
I wasn't sure where it needs to go, so I did this for a quick fix.
appurl = NSURL.fileURLWithPath("/Applications/Adobe Indesign CS5/Adobe
@id = SBApplication.applicationWithURL(appurl)
doc = @id.activeDocument
pgph = doc.allParagraphStyles
pgph.each do |style|
This code works, but it takes 15+ seconds to set up the link to InDesign
(similar stuff with safari takes about 1 second, and in applescript or
rb-appscript it takes about a tenth of a second for either InDesign or
I also tried
this was just the same.
Is there something I am missing here?
Thanks in advance for any help you can offer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the MacRuby-devel