Re: [MacRuby-devel] Scripting Bridge

2011-11-06 Thread Matt Aimonetti
During my last flight I wrote a 20 lines object-C header parser which dumps a json structure of the header (kinda weird to convert a XML to a header to a JSON, I might want to review my approach soon or later). I'll probably try to write a quick demo app that will load the json structure and let y

Re: [MacRuby-devel] Scripting Bridge

2011-11-03 Thread Matt Aimonetti
If you call "methods(true, true).grep /export/i" on one of your objects and you get a method signature such as: exportFormat:to:showingOptions:using:versionComments:forceSave: That means you need to call it as shown in my example: page.exportFormat("tagged text/PDF", to:"/Users/mattetti/tmp/page2.

Re: [MacRuby-devel] Scripting Bridge

2011-11-03 Thread Spencer Rose
And now I am reading chapter 8 of your book again because I remembered something about noMethodErrors and selectors. Starting to make sense. Stay tuned. :) ___ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/m

Re: [MacRuby-devel] Scripting Bridge

2011-11-03 Thread Spencer Rose
So final question, now that I downloaded the updates to scripting bridge, and it compiles fine, I still get errors such as: `': undefined method `exportFormat' this is right after running your "doc.packageTo" method which worked great. I got the exportFormat method and other methods I have tri

Re: [MacRuby-devel] Scripting Bridge

2011-11-02 Thread Matt Aimonetti
Your Snow Leopard machine needs to have the latest BridgeSupport installed: http://www.macruby.org/files/BridgeSupport%20Preview%203.zip Lion has the final version already installed. We added some more info on the website and we will hopefully deploy the updates soon when 0.11 goes live. - Matt

Re: [MacRuby-devel] Scripting Bridge

2011-11-02 Thread Spencer Rose
So I apologize for being such a pain, I appreciate the help though. I have tried everything and cannot get the bridgesupport file to generate on my machine at work which has Snow Leopard on it. I came home tonight and used my MacbookAir which has Lion on it, and it worked perfectly. Things are wo

Re: [MacRuby-devel] Scripting Bridge

2011-11-02 Thread Spencer Rose
Actually, when I build the bridgesupport file I get errors. ./inDesign.h:6176: error: duplicate declaration of method ‘-mergeWith:’ ./inDesign.h:6411: error: duplicate declaration of method ‘-mergeWith:’ a lot of them. There were 500+. After greping them and writing a script to remove those li

Re: [MacRuby-devel] Scripting Bridge

2011-11-01 Thread Matt Aimonetti
Yes, I also saw these warnings (not errors). The header file and the bridgesupport look good here on Lion. I did some more tests and here is what I got: I was able to package the document with the following script: framework 'Foundation' framework 'ScriptingBridge' load_bridge_support_file 'inDes

Re: [MacRuby-devel] Scripting Bridge

2011-11-01 Thread Spencer Rose
Did you get a bunch of errors like this: sdp: warning: skipping redeclared enumeration "inDesignOTpf" sdp: warning: skipping redeclared enumeration "inDesignJrua" when making your header? I am getting errors when making the header file, and I am sure that is the reason for errors when making

Re: [MacRuby-devel] Scripting Bridge

2011-11-01 Thread Spencer Rose
Incredible help, thanks so much Matt. This is a huge project for my company and willbe ongoing. There is a lot of information in your replies and I will probably spend a day or two working through a lot of it. I will most definitely be back to this post for more help however, and would be

Re: [MacRuby-devel] Scripting Bridge

2011-11-01 Thread Matt Aimonetti
I generated the header file and looked at the description and I think that the issue us that the returned value isn't cast: @property (copy) id appliedFont; // The font applied to the find glyph preference, specified as either a font object or the name of font family. Can return: font, string or

Re: [MacRuby-devel] Scripting Bridge

2011-11-01 Thread Matt Aimonetti
I talked with Laurent and it said that the fact that the object type is SBObject is probably done on purpose by the inDesign API. - Matt On Tue, Nov 1, 2011 at 12:12 PM, Matt Aimonetti wrote: > I generated the header file and looked at the description and I think that > the issue us that the ret

Re: [MacRuby-devel] Scripting Bridge

2011-11-01 Thread Spencer Rose
Hey Matt, Thanks for the response. I had already read and done the tutorial there. It was very helpful. The problem is not so much the weakness of Scripting Bridge, it is the difficulty in knowing all of the method calls and their syntax available from InDesign. Following an earlier threa

Re: [MacRuby-devel] Scripting Bridge

2011-10-31 Thread Matt Aimonetti
Hey in this post http://merbist.com/2010/01/17/controlling-itunes-with-macruby/ I'm explaining how to do that with iTunes. I haven't tried scripting InDesign but the same concept/approach should apply. I have InDesign CS5.5 installed on my machine, if you share some code with you, I might be able

[MacRuby-devel] Scripting Bridge

2011-10-31 Thread Spencer Rose
Hey everyone, any help would be incredible. I am consolidating a workflow with scripts into an actual desktop application. When a search down to base "leaf" node such as "AppliedFont" from a paragraph style in InDesign, all I get is a SBObject. I need the name of the font. I am struggl