|
Script Debugger is a fine tool to develop AppleScripts.
Now I have tried to develop JavaScripts with Script Debugger with JavaScript
OSA.
It took me some effort to find out the Signature of InDesign for the MacOS.AEApp
object (it's "InDn"). And I had access to some properties:
var myInDesign = MacOS.appBySignature("InDn");
var myDoc=myInDesign.documents[1];
var myDocName=myDoc.name;
var myStory=myDoc.stories[1];
var myText=myStory.paragraphs[1].contents;
var myPage=myDoc.pages[1];
But I still have trouble to access textFrame properties:
var myFrameCont=myDoc.pages[1].textFrames[1].contents;
-->ScriptError: "TypeError: myDoc.pages[1].textFrames has no properties"
As I try and I try, I cannot see the error in the syntax.
Are there problems with JavaScript OSA and Script Debugger?
Martin
|