Copy link to clipboard
Copied
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
Wow that took me 2 seconds to find…
Copy link to clipboard
Copied
Wow that took me 2 seconds to find…
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
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
Copy link to clipboard
Copied
Hi Loic,
The problem is that I could not understand hierarchy of k4 DOM.
Sumit