🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.scripting.indesign
8 messages
8 total messages Started by thiyagus5 Thu, 05 Feb 2009 09:05
Give #10 increment to each index entry folios....
#1509
Author: thiyagus5
Date: Thu, 05 Feb 2009 09:05
17 lines
1004 bytes
Hi experts,

Already we finished the index file in InDesign CS2. Now the file is in the correction stage. The corrections is to update each entries folios by adding ten numbers.

Example:

A-B-C model of emotional reactions, 592�593
ability, 392
abnormal behaviour, 602�604.
absolute, 82
accommodation, 136, 474�475
acculturation, 335

It is too hectic to do manually, can anyone help me for this.

Thanks in advance
Thiyagu
Re: Give #10 increment to each index entry folios....
#1517
Author: Dave_Saunders
Date: Thu, 05 Feb 2009 12:40
26 lines
1713 bytes
Does this work?

myIndex = app.selection[0].parentStory 
setupFindGrep("\\d+") 
myFinds = myIndex.findGrep(); 
for (var j = myFinds.length - 1; j >= 0; j--) { 
  myFinds[j].contents = String(Number(myFinds[j].contents) + 10) 
}

function setupFindGrep(find, change, foots, hidLayers, lockedLayers, lockedStories, masters) { 
  app.findGrepPreferences = null; 
  app.changeGrepPreferences = null; 
  try { app.findGrepPreferences.findWhat = find } catch(e) {}; 
  try {app.changeGrepPreferences.changeTo = change } catch(e) {}; 
  app.findChangeGrepOptions.properties = { 
    includeFootnotes:(foots == null ? false : foots), 
    includeHiddenLayers:(hidLayers == null ? false : hidLayers), 
    includeLockedLayersForFind:(lockedLayers == null ? false : lockedLayers), 
    includeLockedStoriesForFind:(lockedStories == null ? false : lockedStories), 
    includeMasterPages:(masters == null ? false : masters) 
  } 
} // end setupFindGrep

Be warned that I just wrote this here and haven't tested it. The function works correctly; that I lifted from my library of text snippets.

Dave
Re: Give #10 increment to each index entry folios....
#1518
Author: Dave_Saunders
Date: Thu, 05 Feb 2009 12:42
3 lines
815 bytes
Of course, this approach assumes that there are no digits in any of the index topic names.

Dave
Re: Give #10 increment to each index entry folios....
#1300
Author: thiyagus5
Date: Mon, 09 Feb 2009 02:06
6 lines
854 bytes
Hi Dave,

Great its working fine with CS3. Thanks for your kind support. Sorry dave, last two days unfortunately i was out of station. We need this script for InDesign CS2 because the source file is in CS2. Once again i am thanking you.

Regards
Thiyagu
Re: Give #10 increment to each index entry folios....
#1301
Author: Dave_Saunders
Date: Mon, 09 Feb 2009 02:09
3 lines
839 bytes
Export the index to RTF, pour it into CS3, run the script, export again as RTF, run it back into the CS2 document.

Dave
Re: Give #10 increment to each index entry folios....
#1334
Author: thiyagus5
Date: Tue, 10 Feb 2009 01:48
5 lines
822 bytes
Hi Dave,

Thanks for your valuable support. I am also felt the same. I know its very difficult to do in CS2. But i am just asking you that there is any way to do this in CS2. Once again Thanks dave.

Thiyagu
Re: Give #10 increment to each index entry folios....
#1335
Author: Dave_Saunders
Date: Tue, 10 Feb 2009 01:54
3 lines
758 bytes
It can be done but it is quite an effort. If I were faced with the problem I'd write a script, but I stopped using CS2 a long time ago.

Dave
Re: Give #10 increment to each index entry folios....
#1482
Author: thiyagus5
Date: Wed, 11 Feb 2009 09:26
3 lines
623 bytes
Ok thanks Dave.

Thiyagu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads