-
1. Re: Words from index Panel - TOPIC and apply page references.
indegn5 Apr 21, 2013 5:05 AM (in response to indegn5)To have more clearance on my previous request.... i have attached this..
The above panel has the words listed below the Topic, but inside the document the same words are not referenced... (some one has removed the pageReferences).
eg. the highlighted words in the topic, found inside the document has no index mark (^).
I wish to apply PageReferences to all the words listed the TOPIC.
thanks forum....
-
2. Re: Words from index Panel - TOPIC and apply page references.
indegn5 Apr 21, 2013 9:52 AM (in response to indegn5)Well Forum!,,,
Here i got clue to find the topic word and relate to the document text and then add Pagereferences(~I) to the finded word.
But the problem is It find and place the pageReference symbol only for the first found.
I think, here im missing the way of refreshing find and replace and then continuing its process.
Could anybody look atthis script, to make to find and apply all the found instances
and then to run the taks faster...(I checked, if the document has more than two pages, the script take atleast 30 min to complete and the result is, it applied only for the first instances of the first search).Please.....Help onthis
app.findGrepPreferences = app.changeGrepPreferences = null;
myDoc = app.activeDocument;
myStory = app.activeDocument.pages.everyItem();
gwords = app.activeDocument.indexes[0];
twords = app.activeDocument.indexes[0].topics.everyItem().pageReferences.everyItem().toString();
var raj = new Array;
raj.push(twords);
app.findGrepPreferences = app.changeGrepPreferences = null;
var findWhat = app.findGrepPreferences.findWhat = (raj).toString();
founds = app.documents[0].findGrep();
for (i =0 ; i<founds.length; i++)
found = founds[i];
app.select(found);
myDoc.indexes[0].topics[0].pageReferences.add(found, PageReferenceType.currentPage );
//myDoc.indexes[0].topics.everyItem().pageReferences.add(found, PageReferenceType.currentPage);
app.findGrepPreferences = app.changeGrepPreferences = null;
gwords.update();
var myIndexStory = gwords.generate();
thanks.& regards..
bob....
-
3. Re: Words from index Panel - TOPIC and apply page references.
Sureshkumar Selvaraj Apr 21, 2013 11:04 PM (in response to indegn5)Hi indegn5,
I have a doubt that where the for loop closed in your code.
-
4. Re: Words from index Panel - TOPIC and apply page references.
indegn5 Apr 22, 2013 6:01 AM (in response to Sureshkumar Selvaraj)Hi Selva,,
Though the loop have been closed at
for (i =0 ; i<founds.length; i++) {
found = founds[i];
app.select(found);
}
The programme still run slower, and the find and apply pagereferences occures, only to the first item.
EG. IF I need to find Apple, Bat, Cat and there are available on page 2,3,4, 5, 6, etc.,
the Index generated shows only on first page..ie.
Apple 2
Bat 2
Cat 2
but the other pages nos. 3, 4, 5, 6 which have the same things Apple, Bat, Cat is not shown in the index...
my result should be..
Apple 2,3,4,5,6,
Bat 2,3,4,5,6,
Cat 2,3,4,5,6,...
thanks...
any help to find all the pages and the script to run faster to give the result...
thanks.
-
5. Re: Words from index Panel - TOPIC and apply page references.
Sureshkumar Selvaraj Apr 22, 2013 6:50 AM (in response to indegn5)Hi,
Try this
app.findGrepPreferences = app.changeGrepPreferences = null;
myDoc = app.activeDocument;
myStory = app.activeDocument.pages.everyItem();
gwords = app.activeDocument.indexes[0];
twords = app.activeDocument.indexes[0].topics.everyItem().getElements();
app.findGrepPreferences = app.changeGrepPreferences = null;
for(j=0; j<twords.length; j++){
var findWhat = app.findGrepPreferences.findWhat = twords[j].name;
founds = app.documents[0].findGrep();
for (i =0 ; i<founds.length; i++){
found = founds[i];
app.select(found);
myDoc.indexes[0].topics[j].pageReferences.add(found, PageReferenceType.currentPage );
}
}
gwords.update();
var myIndexStory = gwords.generate();
-
6. Re: Words from index Panel - TOPIC and apply page references.
Pickory Apr 22, 2013 8:31 AM (in response to Sureshkumar Selvaraj)Hello,
There is a free script here:
http://www.kerntiff.co.uk/products-4-indesign/indexers-corner/kps-index-utilities/quickind ex
The free script is the one with more options on the palette.
You will need to look here to see how it works.
HTH.
P.
-
7. Re: Words from index Panel - TOPIC and apply page references.
indegn5 Apr 22, 2013 9:21 AM (in response to Sureshkumar Selvaraj)Hi Suresh,
thanks for denoting the loop;;;
for(j=0; j<twords.length; j++){
var findWhat = app.findGrepPreferences.findWhat = twords[j].name;
where i have forgotten to write it and in other words, i called as source.toString();
Many thanks for you quick reply!
You take my favourite points......
thanks...


