CS3 IndexFromList.jsx  with a twist

I'd like to thank Martin Fischer for rewriting the IndexFromList.jsx script for CS3: http://www.hilfdirselbst.ch/foren/Skript_zum_Index_generieren_P322824.html#322824
It takes a list of index entries and indexes every occurence of the topics in the list. Usually the authors of the books I typeset have created such a topic list, so the script really speeds up the proces of finding the page references.
The list drawn up by the authors needs tweaking, as they don't take into account the way Indesign's indexing deals with case, whole word and proper names.
This is an example of what a portion of the concordance list could look like before and after tweaking:
postmodernism
postmodern
postmodernism
postmodernist
postmodernists
postmodernity
In the final index these topics are grouped into the 'postmodernism' entry. But that leaves a lot of manual work changing the index topics of the similar terms. An added step to the script could perform this automatically, if you change the concordance list into a two column list. The right column indicates which terms should be grouped:
postmodern | postmodernism
postmodernism | postmodernism
postmodernist | postmodernism
postmodernists | postmodernism
postmodernity | postmodernism
So instead of adding (oneWord) the script would add the term in the second column:
// Hinzufügen des Themas
myDoc.indexes[0].topics.add(oneWord);
Or is this too complicated a way to address the problem?

Hi Gaphic,
here's a new version of the script: http://www.hilfdirselbst.ch/gforum/gforum.cgi?post=343938#343938
// IndexFromList_withOneSubtopic_CS3.jsx  
//DESCRIPTION: Erzeugt Indexeinträge anhand einer externen Konkordanzdatei, die über einen Dialog ausgewählt wird. 
var myDoc = app.activeDocument;  
var myList = File.openDialog ("Liste mit Indexbegriffen"); 
if (!myList) exit(); 
clearFindChangeSettings();
app.findChangeTextOptions.wholeWord = true;
app.findChangeTextOptions.caseSensitive = true;
app.findChangeTextOptions.includeFootnotes = true;
var myEntries = getWords(myList); 
proceedWithList(myEntries); 
alert("Erledigt!"); 
// Konkordanzliste einlesen 
function getWords (aFile) { 
if (aFile.exists) { 
  aFile.open ('r', undefined, undefined); 
  var aText = aFile.read()+'\n'; 
  // löschen von Leerzeichen am Ende der Zeile + löschen von leeren Zeilen  
  aText = aText.replace(/ +\n/g, '\n').replace(/\n+/g, '\n');  
  // ersetzen von mehrfach aufeinander folgende Leerzeichen aller Art durch ein Leerzeichen 
  aText = aText.replace(/ {2,}/g, ' '); 
  var words = aText.split('\n');
  var myPairs = getPairs( words );
  aFile.close(); 
  return myPairs; 
else { 
  exit(); 
function getPairs( w )
var thePairs = new Array;
for (i = 0; i < w.length; i++ )
  thePairs.push( w[i].split(' | ') );
return thePairs;
// Begriffsliste abarbeiten 
function proceedWithList (w) { 
// bei Bedarf wird ein neuer Index erzeugt 
if (myDoc.indexes.length == 0)  
  myDoc.indexes.add();  
for (var i = 0; i < w.length; i++)  
  if (w[i] != "")  
   makeEntry(w[i]); 
// Aktualisieurng des Index 
myDoc.indexes[0].update(); 
// Indexeintrag erzeugen 
function makeEntry(oneEntry) {
if ( oneEntry.length == 1 )
  app.findTextPreferences.findWhat = oneEntry[0];
else
  app.findTextPreferences.findWhat = oneEntry[1];
var myResult = myDoc.findText();  
for (var i = myResult.length-1; i >=0; i--) {  
  // Fehler abfangen, z.B. Fußnoten ausnehmen 
  try { 
   // Hinzufügen des Themas 
   myDoc.indexes[0].topics.add(oneEntry[0]);  
   // Hinzufügen der Referenz 
   if ( oneEntry.length == 1 )
    myDoc.indexes[0].topics.item(myResult[i].contents).pageReferences.add(myResult[i], PageReferenceType.currentPage);  
   else
    //myDoc.indexes[0].topics.add( oneEntry[0]);
    myDoc.indexes[0].topics.item( oneEntry[0] ).topics.add( oneEntry[1]);
    myDoc.indexes[0].topics.item( oneEntry[0] ).topics.item( myResult[i].contents ).pageReferences.add(myResult[i], PageReferenceType.currentPage);  
  catch(e) {} 
//Clear any existing find/change settings.
function clearFindChangeSettings()
app.findTextPreferences = NothingEnum.nothing;
app.changeTextPreferences = NothingEnum.nothing;
This version supports one topic and one topic with one subtopic.
The list should look like this:
topic 1
topic 2 | subtopic 1
topic 2 | subtopic 2
topic 2 | subtopic 3
You can manage multiple indexes (names, places, subjects) like this:
names | Kafka
names | Peirce
names | Williams
places | Berlin
places | Munich
subjects | health
subjects | sunshine
Maybe some day there will be a version which manages more than one subtopic.
regards
Martin Fischer

Similar Messages

  • Can i keep using bridge cs3 in combination with photoshop cs5

    can i keep using bridge cs3 in combination with photoshop cs5

    I have a question sort of relevant to this discussion. Had my 8800GT start to fail on me in my MacPro1,1 - in desperation I disassembled the card, cleaned it, applied fresh thermal compound/padding, and stuck it back in. To my amazement the card actually began working again! Before failing a few days later ; ;.
    I ordered a replacement 8800GT on ebay for a considerably low cost, but before it arrived my computer began behaving normally again. From what I'm understanding from this thread, there is absolutely no benefit to installing both cards in my computer at the same time? If that's the case, I'm going to tuck the backup card away and keep riding my self-repaired card until it crashes again.

  • Cs3 problem printing with mavericks

    cs3 problem printing with mavericks

    Hello @arcticbear38,
    Welcome to the HP Forums!
    I understand you're receiving a small portion on the left hand side of a document missing on both printers. I will do my best to assist you! Does this happen when you print from one program or many program(s)?
    Both of these printers are not indicating low on ink? I would recommend resetting the printing system on your computer by following this Apple document here. I will be looking forward to hearing from you. Have a great night!
    I worked on behalf of HP.

  • CS3 seizing/crashing with Windows 7

    I have bought a new computer running Windows 7.
    My CS3 keeps seizing up when using some tools. I can't be precise because when it seizes I am so annoyed that I forget to log which tool caused the problem but an educated guess  - it's non specific. It can happen anytime.
    It opens Ok and I start working on a photo and then, at some time during the process,  it seizes up.. I have downloaded all applicable updates.
    I am assuming it is Windows 7.
    If it is then it's a problem because I do not have any other computer.
    I appreciate that CS3 was not designed for windows 7 but I am sure that Adobe must have upgraded CS3 to cope with new windows software. Or have they?
    Any advice please?
    As a secondary question - If CS 3 not compatible with windows 7 - Is CS4 compatible?  I really can't afford CS5.

    What the devil are you talking about, Andrew?  All the Microsoft x64 operating systems run 32 bit software perfectly.  They always have.
    Not only that but 32 bit Photoshop can actually access much more RAM than its normal 2GB  limit on a Windows x64 operating system, because each 32 bit application is given access to more of the full 32 bit address space than on a native 32 bit operating system.
    And 2.6 GB of RAM is more than plenty to run Windows x64.  A well set up system actually takes up only about 0.6 GB.
    Andrew, you should actually try things yourself before making statements.  May I suggest you invest some time and effort into a virtualization environment, such as VMware, so that you might gain some personal experience with such things.
    It is in NO WAY "just plain stupid" to use an x64 operating system with 2.6 GB of RAM.  It may be all the computer hardware that cymruboy has can handle, and it's the best system he could have chosen for a variety of reasons.
    While I agree that more RAM may help, I suspect that cymruboy will see better Photoshop operation just by turning Photoshop's memory usage limit down to about 60%.
    -Noel

  • I keep trying to download Photoshop CS3 and a get a 404 error page, does Photoshop CS3 not working with a new Mac operating system?

    I keep trying to download Photoshop CS3 and a get a 404 error page, does Photoshop CS3 not working with a new Mac operating system?

    you must also use a browser that allows cookies.  try a different browser or download from adobe.com
    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5.4 (win), 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Need help getting Adobe OnLocation CS3 to work with windows 7 64 bit. Any ideas?

    Need help getting Adobe OnLocation CS3 to work with windows 7 64 bit.  The program installed ok and the S/N took.
    The program does record video and audio HDV M2T.
    The problem is video doesn't display or play back on the monitor component @ 16:9 or 720 p.  4:3....
    The scopes respond as do the audio components when recording. (with a blank monitor component).
    The video does play back on my system no problem.
    Any ideas?
    Dan

    Moving the discussion to OnLocation
    Thanks,
    Atul Saini

  • HT1338 We are currently running CS3 on Macs with OS 10.5.8 but need to upgrade the OS in order to prepare e-books. Will we have any problems with CS3 running on the later OS?

    We are currently running CS3 on Macs with OS 10.5.8 but need to upgrade the OS in order to prepare e-books. Will we have any problems with CS3 running on the later OS?

    Check the Adobe website for compatibility.
    Ciao.

  • CS3 strange order with LabelGraphics.jsx

    Hi all,
    I am experiencing a strange behavior with LabelGraphics.
    I can not figure how to make the script use a defined list in conjunction with a paragraph style to properly number the images from the beginning of the document downwards (or even continue across an InDesign book).
    Any ideas?
    Thanx in advance
    Michael

    to Olav,
    Thanx for letting me realise that it is not a problem from my side. I went on and tried the change you suggested and it worked as you predicted. It does not give consistent results. I gets all mixed up when I had more than 3 images on a page.
    to loic,
    I think that scripting is about cheating. You get to execute mountainous tasks with just one click. I can fully understand your way of thinking. I do not think I could reorder the paragraphs or relink the text frames since I work with long documents in autoflow (chapters of 50+ pages)
    The way I see it it would have to be one of two ways.
    Either 1. A topleft - bottomright approach, or
    2. A gravity like approach. This way the script would "hit" the highest on the page image going to the lower and so on.
    So could you please elaborate on your solution? And when I say elaborate I mean provide the copy/paste I would have to apply since I do not know scripting?
    It would be great if it worked.
    Thanx to both
    Michael

  • Photos missing from iPhoto/TM backup but with a twist.....

    So, there is a challenging twist associated with this case of missing photos and I hope an expert can provide some advice. Note: This is not related to upgrading from iPhoto '09 to '11 thank goodness!
    Here is the story in condensed form, with additional details below:
    MBP stolen but backed up with TM
    Used TM on the replacement MBP to browse backup of iPhoto backup of stolen MBP
    Restored iPhoto library to new MBP
    Open iPhoto on new MBP and browse library
    Everything looks OK except *FIVE* Events which show in the Event viewer as blank grey squares. However, the Events have the correct titles and show the correct number of pictures in brackets in the title. In addition, using the trackpad to scroll over the Event there are no thumbnails visible. If I click on the Event all the photos are greyed out but they do have the correct titles and keywords below the grey boxes. If I click on an individual photo I get a black exclamation mark in a grey circle. Interestingly the LAST IMPORT folder in iPhoto DOES show the thumbnails for ALL the missing pictures, all arrange with the correct Event titles. Of course, clicking on any individual picture gives me the same exclamation mark detailed above.
    After reading these support forums I have tried the following:
    1) Viewed package contents ---> the blank Events DO NOT show up as folders in the Finder window
    2) Used COMMAND & OPTION to launch iPhoto and checked the following boxes in the REBUILD DIALOG BOX: rebuild small thumbnails/rebuild all of the photos' thumbnails/recover orphaned photos/examine and repair permissions ---> Issue persists
    3) Download iPhoto Manager and tried EXTRACTING all the photos from the library --> Photos from missing events still not showing up. Not really surprising given that the VIEW PKG. CONTENTS in #1 above didn't show them either.
    4) Used iPhoto Manager to REBUILD LIBRARY --> still doesn't show them
    5) Used TM to browse the backup directly --> missing photos have blank placeholders only.
    It appears for what ever reason the photos have been deleted from the backup. I say "deleted", as opposed to "not backup up", because iPhoto has the remnants of the photos (i.e, Events, thumbnails, titles, keyword, etc.). Any suggestions on how to possibly recover these missing pictures. How about the thumbnail versions at least, even in their their low resolution form. Although, I admit I don't know how/where thumbnails are dealt with in iPhoto as they don't seem to show up in the Library package contents.
    Additional info:
    OSX 10.7.5, iPhoto '09 is version 8.1.2, and iPhoto library is 75GB, 139 Events, 28,000 pics
    The day before the MBP was stolen I downloaded a number of photos and did some editing. That night plugged the MBP in and noticed that the Time Machine did a number of backups through the night, although the iPhoto library seems untouched but can't be sure. The following morning, the computer was used for a few hours and thus had plenty of time to complete any backups necessary.
    The *FIVE* Events that are affected seem to be the most recent ones, worked on the night before the MBP was stolen.

    I cannot say for certian but it is highly likley that YES, when the person finished editing they just closed the lid of the computer and didn't actually quit iPhoto. So would this explain why there are fragmenst of them in the backup (i.e. Events, keywords, thumbnails, etc.) but not the actual image files? Any way I can at least save the extremely low res thumbnail versions?
    I'm also going to try Data Rescue on the camera memory card to try and recover them that way.
    Thanks.

  • Would like to Downgrade OS, with a twist.

    Hi,
    Thanks for reading !
    The thing is i play games and recently ive come up against a brick-wall in that i cant play World of Warcraft, ok so its not gonna ruin my life but ...
    Anyway what happens is ( after either 10.4.9 / 10.4.10 ) login to game and maybe 5 mins after I will be disconnected from the game server. Not only that and this is the crunch, net connectivity is lost completely. No safari, skype, ventrilo ..nothing. On attempt to reconnect, `the other side is not responding`. Ive tried by direct ethernet and using a wireless router with no luck.
    As to how im writing this email, a restart of computer magically fixes it. The weird thing is that my IP address keeps changing, why that is i cannot say. Hence why i throw myself down upon the mercy of those who may understand it better than i do.
    The solution? Reverting to a previous version of the OS seems a good bet. I know it can be done using the Mac install cds. This brings me to the twist, the optical drive that came with my mac was great for a while but now is unable to read either cds or dvds ( and yes ive tried every brand under the sun ). Guess i got one of the bad ones there then. To avoid me just moaning >
    1) Can a downgrade be done without the boot cds?
    2) Would it just be better to get the drive fixed? ( im loathed to do this as i use it a great deal for work and it would be a big loss)
    I have an an external HD if that helps Im guessing that a reformat is in the offing but sob sob...
    Anyone any ideas about what the trouble is in any case??
    kind regards
    M.
    MacBook Pro 15"   Mac OS X (10.4.10)   2Ghz CoreDuo, 2Gb RAM

    I would concentrate on the changing the IP address rather than reinstall the OS! Can yo ugive anymore details on that? It is obviously where your issue lies. How is your network setup? Even if you have a very short DHCP lease, the router should try and redistribute the same IP address to you, so an every changing address is a problem.

  • Pro  cs3 crashing constantly with extra audio

    As described above; when putting another audio wavefile on the timeline [track 2] pro cs3 starts crashing [pc boots!] when moving along the timeline and using the ripple edit tool.
    Project doesn't want to open again afterwards...
    I use aspect hd to edit hdv in a cineform pal preset.
    All updates for pro cs3 are taken care of.
    Tried the same thing in Pro 2, and no crashing there.
    Currently i am using pro2 again, but i was wondering if there are more people who are experiencing this.

    Some additional information:
    Sound card is a Claro Plus XT not XP.  Used to typing XP heh
    Also, the video capture works with the included blackmagic capture software, as well as freeware solutions like VirtualDub and a Japanese freeware program I use.  I'm able to capture video and audio without issue on those.  Just don't know why Premiere doesn't do it...

  • [CS3][JS] Help with image resizing

    I'm still a newbie of ID scripting.
    I'm using js scripting in Indesign CS3 to make an auto-impaginator and I have a problem with images.
    I charged my contents from an xml set of tables, that I put into a fixed textFrame of the master page.
    Because of the table needs to fill multiple pages, I made a function that keep creating pages and link the textFrames so that the table continues in various pages.
    In this whole process I have some images too, that I need to resize them to fill the cell, because now they pass the parent cell.
    I found a method that looks at the bounds and resizes the image and the rectangle too, but it doesn't work always, because if a image is overflowing, it hasn't any bound and it fails, and this causes other problems in my process, so I would find another method.
    So:
    Is there another way to resize an image on-the-way while importing it? Some xml attribute or preference?
    Or some method that works also if the image is overflowing?

    These forums are pointless. Adobe must believe that other users will cut the mustard. Absolutely a waste of effort for everyone. Adobe should PAY at least a junior developer involved in the projects to monitor and help with these posts. FLEX rules yeah and thousands more do scripting than develop plug ins...
    Come on Adobe, step up your better than this. Customer Service can be free to the customers ... we are not talking about GET IT ALL FREE, talking about buy it and create a community and support it, but then again LAYERS and INDESIGN SECRETS have people who actually want to help users rather than rabbit hole everything.
    Please join hands and SING...

  • [JS][CS3] Selection Menu with images

    I have no idea it this is possible, but I have written this code at the start of a script to select a function within the script:
    myDialog = app.dialogs.add({name:"Catalogue Selector"});
    with(myDialog)
            with(dialogColumns.add())
              with(dialogRows.add())
                   staticTexts.add({staticLabel:"Select the required catalogue:"});
                   myOptionButtons = radiobuttonGroups.add();
                   with(myOptionButtons)
                        radiobuttonControls.add({staticLabel:"VW"});
                        radiobuttonControls.add({staticLabel:"Peugeot"});
                        radiobuttonControls.add({staticLabel:"MG Rover"});
                        radiobuttonControls.add({staticLabel:"BMW Special"});
                        radiobuttonControls.add({staticLabel:"Nissan HTML"});
                        radiobuttonControls.add({staticLabel:"Nissan XLS"});
                        radiobuttonControls.add({staticLabel:"BMW (GB)"});
                        radiobuttonControls.add({staticLabel:"SEAT"});
                        radiobuttonControls.add({staticLabel:"Citroen"});
                        radiobuttonControls.add({staticLabel:"Vauxhall"});
                        radiobuttonControls.add({staticLabel:"SAAB 1st Column"});
                        radiobuttonControls.add({staticLabel:"SAAB 2nd Column"});
                        radiobuttonControls.add({staticLabel:"Audi"});
                        radiobuttonControls.add({staticLabel:"Fiat"});
                        radiobuttonControls.add({staticLabel:"Ford"});
                        radiobuttonControls.add({staticLabel:"Ford LCV"});
                        radiobuttonControls.add({staticLabel:"Honda"});
                        radiobuttonControls.add({staticLabel:"Vauxhall FUNNY SIZE"});
                        radiobuttonControls.add({staticLabel:"Hyundai"});
    myResult = myDialog.show();
    and what I want to be able to do is add an image to each option.
    Is this possible?
    I am looking to work with CS3 only at the moment.
    Cheers
    Roy

    Dear Roy Marshall
      Please use the below code:
    var myDialog= new Window(''dialog','Sample');
    //Adding Buttons
    myButton1 = myPanel.add('button', [380,13,75,25], 'Choose',{name:'button1'});
    myButton2 = myPanel.add('button', [380,53,75,25], 'Choose',{name:'button2'});
    myButton3 = myPanel.add('button', [380,93,75,25], 'Choose',{name:'button3'});
    myCancel = myDialog.add('button', [500,120,100,25], 'Cancel',{name:'cancel'});
    myImage = myDialog.add('image',[487,16,588,100],'/Macintosh HD/Applications/Adobe InDesign CS3/Scripts/Scripts Panel/Images/xxx.png');
    myCopyright = myDialog.add('statictext',[15,153,400,172],'©xxxxxxx Ltd 2009');
    myButton1.onClick= function()
        alert("this is First");
    myButton2.onClick= function()
        alert("this is Second Button");
    myButton3.onClick= function()
        alert("this is Third Button");
    myCancel.onClick= function()
        alert("Close the Menu");
         myDialog.close();
    myDialog.show();
    Use this Code!!
    Regards
    T.R.Harihara SudhaN

  • Are CS3 files compatible with CS and CS2 apps?

    I am upgrading from CS to CS3 Mac. Are files created in CS3 compatible with CS Photoshop, DW 8, Flash 8, Illustrator and ID?
    And, will uninstalling CS app files effect the CS3 install? This assumes I save certain components I want to keep from each of the older apps.
    I have already installed CS3.3 successfully.

    > Are files created in CS3 compatible with CS Photoshop
    Depends on the features you use. Choose maximize compatibility when saving.
    > DW 8
    For the most part, they should be.
    > Flash 8
    Couldn't tell you Check the Flash forum
    > Illustrator
    Depends on features. Use save as when saving files and choose CS
    compatibility.
    > ID?
    No.
    Bob

  • Migrating PS CS3 to Intel with OS 10.5.6 Plug-ins Not Available

    After migrating CS3 to MacBook Pro, 10.5.6, a list of unavailable plug-ins comes up. All except two were PS plug-ins, NOT aftermarket. Sure enough, they don't show up in the filters menu. I don't know where else they are missing. (migrated from Powerbook 10.4.11)
    What is to be done?
    CS3, OS 10.5.6/ MB Pro 2GB ram, 2.4 Ghz

    Migrating is never a great idea, but migrating an application originally installed under Tiger on a PowerPC machine to a Mac-Intel box running Leopard goes beyond being a monumentally bad, horrendous idea. It's sheer lunacy!
    You need to wipe out that drive, or at least use the Adobe Uninstaller (installed by CS3 in Applications/Utilities/Adobe/ on your old machine), look for, download and run the CS3Clean script, and then install the application from the original media.
    Also, realize that any plug-ins that were not written in Universal Binary will NOT run under CS3 on the Mac-Intel machine,
    unless you run CS3 under Rosetta software emulation with a corresponding
    massive performance hit.
    Never, ever try
    "migrating" again. :(

Maybe you are looking for