Indesign Scripting

Dear Friends
I am having a post in my company for Indesign Scripting,
Intersted people please call 9445559904.

It sounds like he has a job opening. If you are interested, call him.
I'm locking this thread.

Similar Messages

  • How to Run Indesign Script in a file from plugin code in CS4?

    Hi,<br />I have the code to execute the InDesign script stored in external file for InDesign CS3.<br /><br />InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss)); <br />InterfacePtr<IScriptRunner> scriptRunner(scriptManager, UseDefaultIID()); <br />     IDFile scriptFile(scriptFilePath); <br />     if (scriptRunner->CanHandleFile(scriptFile)) <br />     { <br />       ScriptData returnValue; <br />       PMString errorString; <br />       ErrorCode error = scriptRunner->RunFile(scriptFile); <br />         ASSERT(error == kSuccess); <br />     } <br /><br />But the RunFile() method is cs4 expects an additional argument of the type RunScriptParams. <br />Someone please show me with a code snippet on how to excute a script file in CS4??

    Dear Ian
      Here I'm used the below coding in CS3, Its working fine....
    //In CS3 Coding
      PMString jsFullPath("c:\\windows\\sample.jsx"); // a path to my java script file
    do
    const
    IDFile outFile(jsFullPath);InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
    ASSERT( scriptManager ) ;
    InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
    ASSERT( scriptRunner ) ;
    if(scriptManager){
    InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
    RunScriptParams params(scriptRunner);
    ErrorCode err = scriptRunner->RunFile(outFile, kTrue, kFalse);
    while(kFalse);
    But the same time I used this coding in CS4, Its not woking
    //In CS4 Coding
    PMString jsFullPath("c:\\windows\\MacID\\BIN\\sample.jsx"); // a path to my java script file
    do
    const
    IDFile outFile(jsFullPath);InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
    ASSERT( scriptManager ) ;
    InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
    ASSERT( scriptRunner ) ;
    if
    (scriptManager){
    InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
    RunScriptParams params(scriptRunner);
    ErrorCode err = scriptRunner->RunFile(outFile, params);
    while(kFalse);
    I changed the "RunFile" arguments also
    RunScriptParams params(scriptRunner);
    ErrorCode err = scriptRunner->RunFile(outFile, params);
    But Still I'm facing the problem in InDesign CS4.  That's mean  "Adobe InDesign CS4" shout down for serious error happend.
    Please kindly help me, for solving this problem.
    Thanks & Regards
    T.R.Harihara Sudhan
    Message was edited by: Adobe-InDesign CS4

  • InDesign Scripting Guide/Apple Script

    The command
    set myTop to top of margin preferences of myPage
    described in the InDesign Scripting Guide doesn't work with Indesign CS2. Does anyone can help?
    Thanks

    Hi Morenga 65,
    Try:
    tell margin preferences of myPage
    set myTop to top
    end tell
    But, as Dave says, do come to the Scripting Forum--there's lots of good stuff there!
    Thanks,
    Ole

  • How do I handle Style Groups in InDesign Scripting?

    Hi,
    I am relatively new to InDesign scripting.
    I'm trying to map Paragraph Styles to CSS, and it seemed to be working fine, till I came across Style Groups -
    Styles belonging to a group are identified as - Root Style Group name : Child style group name : ...... : Style name
    Because of this paragraph style  <Style name> was not mapping to the TOC style <Root Style Group name : Child style group name : ...... : Style name> and my TOC styles were not correctly mapping.
    I wrote a fix for this in my app, by fetching parent groups and appending to a string - which i check in the TOC style entries.
    Before calling this a FIX, I need to confirm if there are any more hierarchies/represnetations that could be used to represent a Paragraph Style as a TOC style? I don't want to see that a week later I discover something like <Style : Nested paragraph style> as a TOC style and then I'd have to fix my fix!
    Thanks.

    Hi,
    If YourPara is a paragraph style in myDoc and defined inside group of styles named myStGroup
    you can refer to it using:
    myDoc.paragraphStyleGroups.item("myStGroup").paragraphStyles.item("YourPara");
    Jarek

  • It´s possible to call to Adobe Professional 8 with Indesign scripting (.jsx) [JS/CS3] ?

    Hello, I would like to know if it´s possible to communicate with Adobe Professional through a Indesign script (.jsx). I need to convert the pdf file that I export from Indesign to specific standard type that is only available in Adobe Professional.
    I want to save the Indesign generated file with Adobe Professional and obtain the pdf that I particularly need.
    I would like to know if there is a way to do this.
    Thank u,
    Peter

    That's nothing!
    An engineer and I contacted Adobe technical support by phone to ensure the PC I was having custom built was configured to its optimum. They advised XP64 as the best operating environment. After that discussion we had to completely revise procurement, etc to get the bits and compatible XP64 compatible software, putting the build project back a few weeks as well, Imagine how I laughed when I found out on one of these forums that XP64 is the worst choice and totally unsupported by CS4!
    I have written to Shantanu Narayen, Adobe CEO and didn't even get an acknowledgement I raised this last week on the Adobe stand at BVE and was told they'd get someone to contact me asap but guess what, niet...! To be fair there has been one Adobe executive that recognises the problem and the damage poor customer support is causing the company; he has been as helpful as he can. Unfortunately, it seems the overall Adobe culture at the top is "get the money and run". If your problem goes beyond what's already on their web pages, tough luck!
    Regards,
    Graham

  • Call Photoshop script from Indesign script CS4 JS

    Hi, I open Photoshop linked file from InDesign in Photoshop and I need same InDesign script to run Photoshop script on the file. How I can call the Photoshop script from InDesign script.
    Thank you very much for your help.
    Yulia

    Thank you, Kasyan.
    800 lines of script is little be intimidating.
    What we are trying to achieve is to open jpgs in Photoshop and resave them as tiffs and replace same jpg with corresponding tiff in Indesign as it was placed before.
    Is there a way to call Photoshop from Indesign through appleScript.
    I have most of the script done for Indesign and I have Photoshop shript ready that saves jpgs as tiffs done. I am only missing the part where I can call this existing Ph. script from Indisign.
    We prefer not to use BridgeTalk if possible, because we have a lot of programs open and running in the same time, and would like to avoid to open one more program (BridgeTalk).
    Thank you very much for your great help.
    Yulia

  • I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    I am new in indesign scripting, please tell me how to write a script to get  content of a element in xml and then sort all the content

    Hi,
    May the below code is useful for you, but I dont know how to sort.
    Edit the tag as per your job request.
    alert(app.activeDocument.xmlElements[0].contents)
    //Second alert
    var xe = app.activeDocument.xmlElements[0].evaluateXPathExpression("//marginalnote");
    alert(xe.length)
    for(i=0; i<xe.length; i++)
        alert(xe[i].texts[0].contents)
    Regards
    Siraj

  • Can InDesign or an InDesign script solution tell me if I have hidden elements in a document?

    Can InDesign or an InDesign script solution tell me if I have hidden elements in a document? As in the following examples:
    • I import a picture file and some, or all of the file is not viewable in the picture frame, can InDesign alert me of it?
    • I accidentally place a picture so that it is completely covering another picture, can InDesign alert me the an image is being completely covered by another?
    I am using InDesign CS on a Mac running OSX version 10.4.11.
    Thanks,
    Elliott

    Not out of the box. Perhaps with a script. You can ask in the scripting forum.

  • Canvas support in Indesign scripts?

    Hi there,
    short version:
    I was wondering if it is possible in any way to include auto generated raster content (Using canvas api for example) in in-design using JavaScript?
    Long version:
    I noticed that In-design supports a very old version of JavaScript, and since I'm pretty new to InDesign scripting I thought it's better to get informed about its capability / limitations before planing about what to do with it! I wrote a Javascript code (not in in-design script) that generates unique random patterns of motifs, now I'm interested if I can integrate it in in-design scripts so it would put one of this raster images in each page of an in-design document (IE: left and right side of each relatively facing pages);
    also since my first guess after studying a bit In-design's object-model documentation was that it is very much limited to just what is possible through the software UI itself (and not any/some thing new/more), then I was wondering (in that case) how much is it possible to hook an script to an external script, and sending and receiving data/vars between them; like putting both scripts in the same folder, the first one calls the other one giving it some info (document dimensions, etc.), the second script runs (outside of ID), put the images on disk and return to main script when it's done!! :/
    I have some other solution sketches as well in my mind, but wanted to have your input before doing anything ridiculous!! :-)))
    I really appreciate your in-put on this,
    thx, mim,

    And yeah! It looks like I can execute an external file of any type!
    After reading and looking for a while, finally:
    In 52th page of documentation it says:
    execute()
    fileObj.execute ()
    Opens this file using the appropriate application, as if it had been double-clicked in a file browser. You can use this method to run scripts, launch applications, and so on
    Voila! Exactly what I need (If what I think I need is actually what I need! indeed!!)
    I'll try to see if it works later on (impatient actually!), and thx again!
    ,mim

  • SlideShow using Indesign Scripting

    Hello...
    I want to convert the Indesign SlideShow file into HTML file using Indesign Javascript... In Indesign file One Enlarged image will be there and other small images will be there. When you click the small image it should display as Enlarged image...
    Please can anyone help me on this...

    InDesign scripts only work within InDesign, on the native file. For a function such as you imagine, you need to insert some sort of Javscript into the HTML.

  • Whatever happened to the File: Place: In InDesign Script?! I want it back!

    Whatever happened to the File: Place: In InDesign Script?! I want it back!

    I think Configurator will happen for InDesign CC, just not yet.
    For now, you could write a startup script.
    I only suggest these as alternatives. It would have been better if Adobe had made it an option. Very heavy handed and another thing that is going to P loyal users off.
    P.

  • Indesign Scripting Object Model

    Hi,
    Is there some reference documentation that provides detailed information on the Indesign object model as exposed to the scripting interface (javascript)?
    I have done fair amount of scripting in Illustrator so I was looking for the Indesign equivalent of this document
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/pdf/illustrator/scrip ting/illustrator_scripting_reference_javascript_cs5.pdf
    I looked at this document but it seems kind of sparse (compared to illustrator)
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/indesign/pdfs/InDes ignCS5_ScriptingGuide_JS.pdf
    Obviously they are different applications but I was kind of hoping there would be more info for Indesign scripting.
    In particular I am looking for some insight on how to effectively walk or traverse the document structure of an indesign document using code.
    Finding specific things by type seems out of the picture becuase after doing object reflection on all the page items in an indesign document nothing seems to have a "type" property.
    In my illustrator scripts I was able to place stuff in illustrator layers, give arbitrary pageitems a name and then later go find and manipulate via script. Not as clear how to do this in an indesign context.
    The one advantage of this was that in illustrator I was able to use textframes to hold variable data and read later via scripts. The document becomes the database. And I could create any number of arbitrary "variables" inside the document outside the white board. WOndering how to do this kind of stuff with indesign so I can do template driven documents that are managed by scriptings and form UI that I create.

    commnet: Glad to hear you're clear on the new keyword. It's something that a lot of people are confused about.
    Also glad to hear you've read Crockford's book on this stuff. Honestly I think for most InDesign usage, it's a mistake to worry about any kind of inheritance...usually it's easier to ignore all that stuff.
    And to answer the question about number of properties, probably talking max 100 or so. Certainly not thousands. I just want to have my own datastructure embedded in the indesign document that I can easily talk to via scripts. And this data needs to persist between instances of the javascript script's lifecycle. So it seems having some XML to parse is the solution. If that makes sense.
    If there was a way to deal with JSON data "hidden" within an indesign document I would gladly work with that. But I still need to change certain common content snippets inside the flow of the indesign document in a consistent way.
    I think if you have max 100 properties, you should probably choose the methods that are clearest code, rather than most efficient. I suppose you might have noticable delay with 100, though, obviously try it and see. I'm confused but I thought you needed to have your data associated with text elements inside your document, such that it is visible to a user in the user interface. Hence the proposal of using XML tagged text inside a Text Frame. Did that requirement go away?
    If you just want to hide JSON in the document, then use document.insertLabel() of a string of JSON and be done with it.
    You can also use the JavaScript interpreter's E4X features, that give you much richer Javascript bindings for manipulating XML objects and files. Unfortunately the Javascript's XML bindings have nothing to do with the InDesign XML object model. So could, e.g., export the InDesign DOM XML into a file, read that into a Javascript XML object, manipulating with E4X functions, write it out to a file, and then re-import it into the DOM. Not really very convenient.
    I honestly don't know much about Javascript for browsers, so if you could be more concrete in your queries it would be easier to answer.
    Looking forward to your example snippet though.
    OK, so, in Jeff (absqua)'s example, you create a constructor for a changeNumber rule, you call the constructor to make a rule, add the rule to the ruleset, and change a value attribute of the rule, and then process the ruleset.
    This strikes me as...extremely goofy. For two reasons, first the ruleset creation function should be parametrized with the value you want to change, and second, that you go change the rule's attributes after you have added it to a ruleset. Also, while this works in this example, I don't think it's appropriate to have the xpath attribute hardcoded in the rule creation function -- it's much plausible that you want a function that constructs a rule that changes some arbitrary tag to some arbitrary value.
    So, anyhow, if you were going to stick with the constructor paradigm, then I would change from:
    var changeNumber = new ChangeDocumentNumber();
    var ruleSet = [changeNumber, changeDescription];
    changeNumber.value = "5678";
    __processRuleSet(doc.xmlElements[0], ruleSet);
    to:
    var changeNumber = new ChangeDocumentNumber();
    changeNumber.value = "5678";
    var ruleSet = [changeNumber, changeDescription];
    __processRuleSet(doc.xmlElements[0], ruleSet);
    But I don't like this, because it's not parametrized reasonably. I would want something like:
    var changeNumber = new ChangeValue("//DocumentNumber", "5678");
    var changeDescription = new ChangeValue("//DocumentDescription", "New descr.");
    var ruleSet = [ changeNumber, changeDescription ];
    But because of my disdain for classical inheritance in JavaScript, I would instead write it as:
    function changeValue(xpath, newValue){
      return {
        name: "ChangeValue",
        xpath: xpath,
        apply: function(Element, processor) {
          if (newValue) {
            element.contents = newValue;
          return true;
    var changeNumber = changeValue("//DocumentNumber", "5678");
    var changeDescription = changeValue("//DocumentDescription", "New descr.");
    Because I think that a lot clearer about what is going on without introducing confusion.
    Edit: removed "this.value" from the above and just used newValue directly.
    But if you're defining a lot of rules with different apply functions, this is a very cumbersome strategy. You have all this boilerplate for each function that is basically the same but the apply function is different. This is leads to a lot of wasted code duplications. Why would your apply function be different? Well, that would usually be if you are writing functions that move around XML elements within the document hierarchy, or other things that are not simply changing the value of an element.
    I would much prefer to write this as:
    var changeRule = makeRule("change",
      function(element, ruleProcessor, newValue) {
        element.contents = newValue;
    var changeNumber = changeRule("//DocumentNumber", "5678");
    var changeDescription = changeRule("//DocumentDescription", "New descr.");
    var ruleSet = [ changeNumber, changeDescription ];
    This kind of syntax makes it much more compact to create arbitrary rules with different apply functions. In retrospect, the makeRule() function is named wrong, because it returns a function that makes a rule. Perhaps it'd be more reasonable if it was called makeRuleMaker().
    Anyhow, the downside is that the makeRule() function is kind of heinous. I wrote this in March in Re: How to shift content with in cell in xml rules table. But:
    //// XML rule functions
    // Adobe's sample for how to define these is HORRIBLE.
    // Let's fix several of these problems.
    // First, a handy object to make clearer the return values
    // of XML rules:
    var XMLmm = { stopProcessing: true, continueProcessing: false};
    // Adobe suggest defining rules constructors like this:
    //   function RuleName() {
    //       this.name = "RuleNameAsString";
    //       this.xpath = "ValidXPathSpecifier";
    //       this.apply = function (element, ruleSet, ruleProcessor){
    //       //Do something here.
    //       //Return true to stop further processing of the XML element
    //       return true;
    //       }; // end of Apply function
    // And then creating a ruleset like this:
    //   var myRuleSet = new Array (new RuleName, new anotherRuleName);
    // That syntax is ugly and, and is especially bad if
    // you need to parametrize the rule parameters, which is the only
    // reasonable approach to writing reasonable rules. Such as:
    //   function addNode(xpath, parent, tag) {
    //       this.name = "addNode";
    //       this.xpath = xpath;
    //       this.apply = function (element, ruleProcessor) {
    //           parent.xmlElements.add(tag);
    //           return XMLmm.stopProcessing;
    // and then creating a ruleset like:
    //   rule = new Array (new addNode("//p", someTag));
    // So instead we introduce a makeRule function, that
    // allows us to leave behind all the crud. So then we can write:
    // addNode = makeRule("addNode",
    // function(element, ruleProcessor, parent, tag) {
    //     parent.xmlElements.add(tag);
    //     return XMLmm.stopProcessing;
    // and use:
    // rule = [ addNode("//p", someTag ];
    function makeRule(name, f) {
        return function(xpath) {
            var
                //xpath=arguments[0],
                   // "arguments" isn't a real array, but we can use
                   // Array.prototype.slice on it instead...
                   args=Array.prototype.slice.apply(arguments, [1]);
            return {
                name: name,
                xpath: xpath,
                apply: function(element, ruleProcessor) {
                        // Slice is necessary to make a copy so we don't
                        // affect future calls.
                    var moreargs = args.slice(0);
                    moreargs.splice(0, 0, element, ruleProcessor);
                    return f.apply(f,moreargs);

  • InDesign Script to find images w/ prefix code, place img on page along with file name.

    Hello,
    I'm looking for an InDesign script that will prompt me for a code/text, this code/text will be the prefix of images in the sever, and then return the images found with this prefix by placing them on the document page and also display their file names in a text box. Is there such a script out there that anyone recommends. Thank you for your help. I'm on a Mac, using InDesign CS6, Javascript or any other would do.

    Hello,
    I'm looking for an InDesign script that will prompt me for a code/text, this code/text will be the prefix of images in the sever, and then return the images found with this prefix by placing them on the document page and also display their file names in a text box. Is there such a script out there that anyone recommends. Thank you for your help. I'm on a Mac, using InDesign CS6, Javascript or any other would do.

  • Need help in Indesign scripting - Javascript

    Hi
    I have few questions during the indesign scripting.
    Please help me to answer those
    1. Targetting two engines.
    How to target Illustrator engine when the javascripts is running in indesign engine.
    2. Creating text in textframe
    How to create a text in textframe and uniquely identifying it for further updation of content of text.
    3. Creating form fields in Indesign
    How to create form fields in indesign through javascript so that after exporting to PDF it can be modified.
    4. Access method
    How to access methods defined in start up script from the our own cript folder.
    Thanks
    Karthik B

    1. I have No Idea what you mean. Do you want an InDesign script "target" illustrator? Try Brigdetalk.
    2. Described in the Javascript Tools guide.
    3. No amount of scripting will make #3 possible. [*] If you "desperately" need this, write a plugin for it.
    4. I'm not sure, but as far as I know nothing special is needed for that. At least, not if your own script shares the same engine. If it doesn't, then there is no way because that's how it is supposed to work, and no amount of scripting can work around that.
    [*] Apart from writing a complete PDF engine in Javascript, that is. Based on your other questions, it's a fair bet that's not going to happen any time soon.

  • Indesign Scripting Courses

    Hi All,
    Does anyone know of any Indesign Scripting Courses in the London area?
    Thanks

    Actually there was a course in england few years ago provided by Grant Gamble, author of some great InDesign Scripting book :
    Amazon.com: InDesign CS5 Automation Using XML & JavaScript eBook: Grant Gamble: Kindle Store
    You may try to reach the guy for a quote through his linkedin page:
    Grant Gamble | LinkedIn
    Or in yellow pages maybe ?
    HTH,
    Loic
    http://www.ozalto.com

Maybe you are looking for

  • RD530 Mixing Memory

    I have a ThinkServer RD530 and am wanting to upgrade the RAM.  I currently have two 8GB RDIMMS that I would like to continue using while adding two 16 GB RDIMMS.  I have reviewed the memory rules from the HMM but have been unable to confirm either wa

  • Photoshop CS6 - Problems with Canon Easy PhotoPrint Pro!

    Hi, I have been a user of Photoshop for years, starting with CS2, and upgrading regularly. Currently, I have Photoshop CS6, working on Windows 8, 64 bit!  With every version of PS, I have installed a Canon add in, called Easy Photoprint Pro. I have f

  • Disable Backspace Key

    I'm trying to figure out how to disable the backspace key on an input form. Or, I need to figure out why I can't type into an input field after I've backspaced(erased) all the characters?

  • Supervisor password reset on protege r705 p40

    Hi, I wanted to enter to the bios in order to change the boot priority but the laptop jus rebooted. I tried to enter the boot priority via the HWsetup but it is asking for a supervisor password... I don't even recall ever putting a supervisor passwor

  • HTML parsing : javascript

    I have to parse some HTML pages and collect the links present on the page. I am using HTMLEditorKit.ParserCallback to parse the pages. On some pages, javascript code is present. e.g. onclick attribute How can I parse the javascript code/ fetch the UR