Skip navigation
Currently Being Moderated

Compiling jsx to jsxbin, Palette disappears while running

May 22, 2012 3:07 AM

Hi,everyone

 

My ID version is CS5,I have added  # targetengine "session";

I compile jsx to jsxbin, but palette disappears while running.

 

Everybody can tell me the reason?

thanks.

 

best regards

goldbridge

 
Replies
  • Currently Being Moderated
    May 22, 2012 3:16 AM   in reply to goldbridge

    You can wrap contents of jsxbin inside app.doScript() routine and add target engine before it.

     

    jsxbinInJSX.PNG

     

    Hope that helps.

     

    --

    Marijan (tomaxxi)

    http://tomaxxi.com

     
    |
    Mark as:
  • Currently Being Moderated
    May 22, 2012 3:46 AM   in reply to goldbridge

    jsxbin will not allow us to set a targetengine, Usually I'll do exactly What Marijan said.

     

    --------------

    Green4ever

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 4:46 AM   in reply to Green4ever

    Hi Marijan,

                  Am getting this error "No file is associated with the currently active script" while running jsxbin file.

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 9:20 PM   in reply to Cenchen

    HI,

     

    Are you using "activescript" in your jsxbin code?

    Are you running the script from ESTK?

    If so, Yes this error message will pop up...

     

    After google it, I found a workaround given by "Dave_Saunders".

     

     

    function getScriptFile() {
      // This function returns the file of the active script, even when running ESTK
      try {
        return app.activeScript;
      } catch(e) {
        return File(e.fileName);
      }
    }
    

     

    You can try it. I hope this will solve the issue.

     

    -----------

    Green4ever

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 10:35 PM   in reply to Green4ever

    Thanks Green4ever. Its working fine now...

     

    And one more thing is, I want to capture the story editor contents with tagging pls...

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 10:52 PM   in reply to Cenchen

    Can you provide some more information about "I want to capture the story editor contents with tagging pls..." So that it is easy to figure it out what you are looking for.

     

    ---------------

    Green4ever

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 11:06 PM   in reply to Green4ever

    Story.JPG

     

    From the above story editor, I wants to get the text like "<title>Introduction</title><p>Major.......".

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 11:18 PM   in reply to Cenchen

    If you export xml from indesign you will get what you want. If you want a particular xml elements only export the selected elements only.

     

    In scripting you can control this by setting the xmlExportPreference.exportFromSelected = true;

     

    Go to http://jongware.mit.edu/idcs5/pc_XMLExportPreference.html and see "exportFromSelected" for more information about this..

     

    ---------

    Green4ever

     
    |
    Mark as:
  • Currently Being Moderated
    May 24, 2012 11:23 PM   in reply to Green4ever

    Hi,

         I need xml content from indesin without export xml.

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 12:11 AM   in reply to Cenchen

    Sorry buddy, Really I don't think this is possible. And also I hope thers is no option to do that. May be some one will help you in this regard.

     

    ---------------

    Green4ever

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 12:23 AM   in reply to Cenchen

    You can walk though the XMLElements to find what you want.

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 12:29 AM   in reply to Harbs.

    If I start with root XMLElement from the indesign structure panel then I will get only whole content of selected element but won't get the sub elements and all.

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 1:37 AM   in reply to Cenchen

    You need t check the XMLElements of each XLElement and deal with the lowest level, up.

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    May 25, 2012 2:17 AM   in reply to Harbs.

    Please any sample code?

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points