Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

InDesign K4(vjoon) Plug-in DOM

Engaged ,
Jun 10, 2017 Jun 10, 2017

Hello js Expert,

Where I can find find Indesign External Plugin DOM?

Like K4(vjoon) Plug-in DOM or In-Math (Movemen) Plug-in DOM.

Kind Regards,

Sumit

-Sumit
TOPICS
Scripting
2.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Jun 12, 2017 Jun 12, 2017

Wow that took me 2 seconds to find…

Class: Event | K4 InDesign Javascript API Documentation

Translate
People's Champ ,
Jun 12, 2017 Jun 12, 2017

Wow that took me 2 seconds to find…

Class: Event | K4 InDesign Javascript API Documentation

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 12, 2017 Jun 12, 2017

Thanks Loic,

I found it day before yesterday.

But I am not able to do scripting of K4 plug-in. I am familiar with jongware indesign API method.

Sumit

-Sumit
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jun 12, 2017 Jun 12, 2017

Oriup  a écrit

I found it day before yesterday.

Sumit

Oh ok, sorry then. You should have told

But I am not able to do scripting of K4 plug-in.

What do you mean ? Is your script failing ? Do you lack understanding of k4 DOM ? If the latter, I guess you can't really script something if you don't get how the plugin works. Actually scripting mainly consists in mimicking manual operations.

Feel free to give more details.

Loic

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 12, 2017 Aug 12, 2017
LATEST

Hi Loic,

Yes, lack understanding of k4 DOM.

1. I want to assign articles to multiple files, I am able to do it, but not able to change user color to yellow.  Here​ is not mentioned color change information.

Screen Shot 2017-08-12 at 2.11.44 PM.png

Here is my code.

myFolder = Folder.selectDialog ("Select folder with indd...");

if(myFolder != null){

  batch_process (myFolder);

}

function batch_process (theFolder) {

  var myFileList = theFolder.getFiles();

  for(var i=0; i<myFileList.length; i++){

  var myFile = myFileList;

  if(myFile instanceof File && myFile.name.match(/\.indd$/i)){

  try {

  var doc = app.open (myFile, true);

  }catch (e) {

  alert("Please open in upper version...");

  exit();

  }

  //insert function here

  add_article (doc);

  try {

  doc.close(SaveOptions.YES);

  }catch (e) {

  alert("InDesign file is converted...");

  exit();

  }

  }else if(myFile instanceof Folder){

  batch_process (myFile);

  }

  }

}

function add_article (myDocument) {

  var myArticleName = myDocument.name.slice(0, -5);

  if(myDocument.k4Articles.length == 0){

  var myArticle = myDocument.k4Articles.add({k4Name: myArticleName, articleColor: UIColors.YELLOW});

//~ myArticle.label = UIColors.YELLOW;

  }else {

  alert("Already, articles created in this document...");

  exit(0);

  }

  for(i=0; i<myDocument.stories.length; i++){

  myArticle.k4AttachObjectInDocument(myDocument.stories);

  }

}

2. Checkout articles and layout with selected files.

3. Check-in multiple files.

Could you help me?

Sumit

-Sumit
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 12, 2017 Jun 12, 2017

Hi Loic,

The problem is that I could not understand hierarchy of k4 DOM.

Sumit

-Sumit
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines