Skip navigation
Currently Being Moderated

Datamerge Preview in custom palette?

May 10, 2012 11:05 AM

Tags: #script #preview #checkbox #palette #datamerge

Fellow scripters,

 

I'm building a bunch of new applications to help improve our productivity of our graphics department and eliminate some tedium.

One application is a custom datamerge palette that allows users to change just the information they edit often, such as the bottom margin and the space between rows/columns. Instead of manually entering the numbers in edittext fields, my palette has nice +/- buttons.

 

However, the great thing about InDesign's datamerge panel is the wonderful 'preview' checkbox, which I can't figure out how to code! I figured there may be a method in the DOM that I'm completely not seeing.

 

Any suggestions?

Thanks in advance,

Mike

 
Replies
  • John Hawkinson
    5,527 posts
    Jun 25, 2009
    Currently Being Moderated
    May 10, 2012 4:39 PM   in reply to BreachofMind

    You can display the panel and check the checkbox:

    app.panels.item("$ID/DataMergePanelName").visible=true;
    app.menus.item("$ID/DataMergeUIPanelPopup").menuItems.item("$ID/Preview Records").associatedMenuAction.invoke();
    app.panels.item("$ID/DataMergePanelName").visible=false;
    

     

    Awkward to be sure.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2012 2:32 AM   in reply to John Hawkinson

    Does the last line switch off the preview, could this be used at end of script before closing file?

     

    (AppleScript newbie!)

     
    |
    Mark as:
  • John Hawkinson
    5,527 posts
    Jun 25, 2009
    Currently Being Moderated
    Jun 1, 2012 7:31 AM   in reply to Dek

    This is in Javascript, not applescript.

    The last line hides the panel, it does not switch off the preview.

    Not sure what you mean about "end of script before closing file?".

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 1, 2012 7:40 AM   in reply to John Hawkinson

    What I have been trying to find out how to do it is add a script into an automator action I created which will open an InDesign file, update links, export as pdf then save and close file.

     

    If a script could be added to preview datamerge, export PDF then switch off preview before saving it would save hours!

     
    |
    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