Possible to make a script for duplicating index entries?

I would like to make things easier than they seem to be.
I have several references (1:st level topics) already that are correct with page numbers and all that.
Now, I would like to create a 1:st level topic, under which I put "duplicates" of these already indexed references and put them as 2:nd level topics, under the main, 1:st level, topic.
Example.
Let's say I have these references (1:st level topics) already, with correct page numbers and everything:
Audi 4-6, 8
BMW 7, 21-24
Citroen 11, 12
Mercedes 80
Volkswagen 31-36
Okay, these are perfectly indexed and all the pages are correct.
Now, I would like to have these references as both 1:st level topics, and also as second level topic references under the main topic "Cars", like this:
Cars 4-80
Audi 4-6, 8
BMW 7, 21-24
Citroen 11, 12
Mercedes 80
Volkswagen 31-36
My question is. Is it possible to achieve this by a script, so I can copy (duplicate) all these references and put them under the topic "Cars" too (preserving the 1:st level topics too of course), without having to go to each of the pages and create new topics all over again for every single finished topic, that I intend to put under the main topic "Cars"?
Just to inform you, the above named 5 topics, are NOT only the topics I want to put under "Cars"... there are like a hundred :).
Is it possible to make a script like this? Or do I have to do all the work ALL OVER again?
Martin

Hmmm… This one copies all files which have 'flash' (could by x-shockwave-flash) string in mime type to /tmp/flash. Hope it will be helpful.
for i in ~/.opera/cache4/* ; do file -i -F '' $i | grep flash | cut -d ' ' -f 1 | xargs cp -t /tmp/flash 2>/dev/null ; done
UPDATE:
Sorry, there was a little bug, I've just changed 'video' to 'flash' ('video' coundn't match 'x-shockwave-flash').
Last edited by zergu (2008-12-25 21:16:38)

Similar Messages

  • How to make a script for expand column width

    Hi experts,
    Is that possible to make a script for expand the column width aim to let the columns show up all the overset text?
    Regard
    John

    Hi John,
    As Uwe advised it would be wise to put a stop on any while loop in case the condition is never fulfilled which would mean the script will break.
    Without knowing what specifically you are working on you could make the below amendments to do this.
    myTables = app.documents[0].stories.everyItem().tables.everyItem().getElements();
    for (var t = 0; t < myTables.length; t++) {
        BE_resizeColumnsToFitContents(myTables[t], 200);
    function BE_resizeColumnsToFitContents(tableToEdit, tableMaxWidth) {
        for (var i = 0; i < tableToEdit.columns.length; i++) {
            while (tableToEdit.columns[i].overflows === true) {
                if (tableToEdit.width < tableMaxWidth) {
                    tableToEdit.columns[i].width += 1;
                    tableToEdit.columns[i].recompose();
                else {
                    alert("Column " + i + " contents too large for column.");
                    break;
    I won't put any extra functions in this because it might not be what you're after. To use this you just define the table width as a second argument to the function (but you could change this parameter to something else, like page, column or cell width). And, if you want to have a fail action you just put it in the 'else' part.
    Brett

  • How to make a script for find text object?

    Hi everyone
    I want to make a script for find and select text object and then find next, find next, and so on, but without any open dialog
    Is that possible make a script for this?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "(\[\x{2022}\])|(\x{25CF})";
    app.findGrep();
    thanks
    Regard

    You already have that. A script does not 'find, select, find next' - it finds all texts as soon as you execute the 'app.findGrep' command.

  • Make a script for build table

    Hi everyone
    How to make a script for build table:
    col width 25mm
    align decimal
    align on close paren
    Thanks
    Teetan

    Hi Teetan VK,
    Merry Chrismas.
    I'm not really an InDesign scripter.
    But you can try the following code:
    // TableCreate_simple.jsx
    // regards pixxxelschubser
    var aDoc = app.activeDocument;
    // your width of every column
    var w = Number(prompt("width of columns", 25));
    var NrOfColumns = 3;
    var aTextFrame = aDoc.textFrames.add({visibleBounds:[0, 0, 30, NrOfColumns*w + 1]});
    var aTable = aTextFrame.insertionPoints[0].tables.add({columnCount:NrOfColumns,bodyRowCount:1});
    for (i=0; i<aTable.columns.length; i++) {
    aTable.columns[i].width = w;
    // Paragraph sytyle with decimal aligning should already exists in your document
    for (j = 0; j < aTable.cells.length; j++) {
        aTable.cells[j].texts[0].appliedParagraphStyle = aDoc.paragraphStyles.item("AlignDecimal");
    Be sure, that a paragraph style (named with "AlignDecimal") exists in your Document.
    But what is:
    Teetan VK schrieb:
    … align on close paren …

  • Creating an index: it's not possible to select a tablespace for the index

    Hi,
    we are using SQL-Developer Version 3.0.04.
    When creating an index it's not possible to select a tablespace for the index. The only choice which is offered by SQL-Developer is <DEFAULT>.
    The user itself has privileges on several other tablespaces - and therefore not just only on the default tablespace of the user.
    Any help will be appreciated
    Rgds
    JH

    Hi JH,
    Well, the capability is somewhat buried in the UI, but it is there.
    In the Create Index dialog ...
    1. Tick the "Advanced" check-box in the upper right-hand corner.
    2. Select "Properties" from the left-hand list (Definition, Properties, Partitions, DDL).
    3. Click the Storage Options... button
    4. Use the drop-down list to select the desired tablespace.
    Return to (2.) and select DDL to see that your tablespace choice is present.
    Regards,
    Gary
    SQL Developer Team
    Edited by: Gary Graham on Mar 7, 2012 5:06 PM
    And if all you see in the drop-down list is <DEFAULT>, then I would suggest rechecking the user's privileges. Or provide more details about your environment: OS / Database / JDK version, and so on.

  • Hi i have a iphone5 I lost my password ha possibility I make the switch for 5s can not open the icloud?? if accepted as pay the difference? thank you for it helped.

    hi i have a iphone5 I lost my password ha possibility I make the switch for 5s can not open the icloud?? if accepted as pay the difference? thank you for it helped.

    Post in your native language.  Your post is very difficult to understand.  What password are you talking about?  You device passcode?  Your Apple ID password?

  • IND 3 or 4: script for making INDEX

    Hi,
    When typesetting books in Indesign cs3/4 (OSX), some of our texts contain words tagged like this: [r]word[#r].
    Those are the words which should end up in the index. It's a timeconsuming job to select these tagged words by hand, apply the 'create a new index entry' (apple-u), and move on to the next one.
    Can someone write a script that automates this nasty job for me? Search for the word between the paranthesis, apply apple-u, move on to the next one.
    I hope it won't be difficult for someone who is used scripting around in indesign.....
    greetings, frits

    Hi Frits,
    Check out this script (post5):
    Peter Kahrel, "Footnote behaviour" #5, 3 Dec 2008 7:24 am
    Kasyan

  • VBA script for automatically indexing topics

    A big disadvantage with InDesign's indexing system is that you cannot automatically index all occurences of topics currently in the index.
    Instead, you have to find an occurence of each topic in the document itself and go to the Index menus and then click New Page Reference...Add All, for each index topic individually.
    To get around this, I have been trying to produce a VBA script to automatically index all occurrences in a document of the topics currently in the document index.
    I have been using the MS Excel VBA development environment but find the definitions of the object model in the Excel VBA browser rather inadequate and ambiguous .
    Is there a more thorough reference work for these?
    The plan was to start by taking each individual topic in the index which I tried to access with something along the lines of:
    MyDocument.Index.Topic(1)
    This hasn't worked.
    The plan then was to take each index topic and use it to find an occurence in the document of that topic and then use that occurence to invoke the New Page Reference...Add All option to index all occcurences of that selected term, using something like:
    MyDocument.PageReferences.Add
    Again, without success.
    Any guidance or suggestions would be appreciated.

    Dear Peter,
    Many thanks for your posting, that was very helpful.
    This is the state of the script so far (I have added a large number of MsgBox entries - these aren't needed, they are just for debugging purposes during development):
    'VBA script which tries to work through all of the topics in the index and automatically index each occurence of them in the current text frame:
    main
    Function main()
    Set MyInDesign = CreateObject("InDesign.Application.CS4")
    If MyInDesign.Documents.Count > 0 Then
        Set MyDocument = MyInDesign.ActiveDocument
        Set MyPage = MyDocument.Pages.Item(1)
        Set MyTextFrame = MyPage.TextFrames.Item(1)
        Set MyStory = MyTextFrame.ParentStory
        Set MyIndex = MyDocument.Indexes(1)
        Set MyTopics = MyIndex.AllTopics
        MyIndexesCount = MyDocument.Indexes.Count
        MsgBox "Current indexes Count: " & MyIndexesCount
        MyIndexTopicsCount = MyTopics.Count
        MsgBox "Current index topics Count: " & MyIndexTopicsCount
        For i = 1 To MyTopics.Count Step 1 'work through the topics
    MyIndexTerm=MyTopics(i)
    MsgBox "Current indexes Topic: " & MyIndexTerm
    'search for MyIndexTerm :
            'Clear Find preferences:
            MyInDesign.FindTextPreferences = idNothingEnum.idNothing
            'Set up search paramaters:
            If MyIndexTerm <> "" Then
                MyInDesign.FindTextPreferences.FindWhat = MyIndexTerm
                'Set search options:
                MyInDesign.FindChangeTextOptions.CaseSensitive = False
                MyInDesign.FindChangeTextOptions.IncludeFootnotes = False
                MyInDesign.FindChangeTextOptions.IncludeHiddenLayers = False
                MyInDesign.FindChangeTextOptions.IncludeLockedLayersForFind = False
                MyInDesign.FindChangeTextOptions.IncludeLockedStoriesForFind = False
                MyInDesign.FindChangeTextOptions.IncludeMasterPages = False
                MyInDesign.FindChangeTextOptions.WholeWord = False
                'Search for the string:
                Set MyFoundItems = MyDocument.FindText 'this ought to be limited to the Story, not the Document eg MyStory
             MsgBox "Found index terms:" & MyFoundItems.Count
                For j = MyFoundItems.Count To 1 Step -1
                   MyTopics(i).PageReferences.Add MyFoundItems(j)
                Next
               'Clear preference:
                MyInDesign.FindTextPreferences = idNothingEnum.idNothing
                'Having found it, add page reference:
             'MyDocument.PageReferences.Add
            Else
                MsgBox "No search term specified"
            End If
    Response=MsgBox ("Continue?", vbYesNo)
    If Response = vbNo then
      Exit For
    End If
       Next
    'Set up Index options:
    MyIndex.IndexOptions.Title = "Index"
    MyIndex.IndexOptions(1).TitleStyle="Chapter Head"
    MyIndex.IndexOptions(1).ReplaceExistingIndex = True
    'Generate the index:
    MyIndex.Generate
    Else
        MsgBox ("Please open a document, select an object, and try again.")
    End If
    End Function
    There are a couple of problem areas still:
    1. Index terms appear to be added irrespective of whether or not that particular page reference already exists in the index.
    This can result in duplicate page references under each topic - especially if the script is run several times.
    Is there any way of avoiding these duplicate references?
    2. I haven't yet suceeded in getting the script to generate the index - so far I've had to do it manually after the script has run.
    The problem lies somewhere in the code to set up the index options and then generate the index.
    3. It might be useful to be able to limit the indexing to the curent story rather than the whole document - but I haven't yet got it to do that.
    Best wishes.

  • Is it possible to make a game for a mobile phone?

    Im a new newbie(means that i completely unaware of J2ME programing)
    I wonder if it is possible to make a game to my pc for a mobile phone and then send it to the mobile using Irda
    ..or more generally if a mobile phone uses or supports j2me can i change the menu(ex add something like a calculator)
    Thanx!!

    Yes, if your phone supports both J2ME and reciving applications by IRDA, but you will need to learn Java, and the J2ME APIs.
    http://developer.java.sun.com/developer/onlineTraining/

  • PDF contains links for $nopage index entries

    I'm using FM6 under Windows XP, and I just discovered that PDF generated by FM
    includes live links for index entries generated from markers using the $nopage
    directive. As a result, an index entry like "see also Frobnication" links to
    the page containing the index marker, which is nonsensical. This has turned up
    in three books we're converting to PDFs for electronic consumption, and there
    are hundreds of affected index entries. Does anybody know of a way to get FM to
    not generate links in the PDF for $nopage entries?
    Thanks,
    Scott

    Hypertext activity can be suppressed for the entire index (not recommended), but not for specific markers. <$nopage> suppresses the page number, but the link is created nevertheless.<br /><br />It it possible to use a "workaround" where the addition of a character format to the See/See Also index markers will serve to limit the link active area (making it very small, even though technically it is still present). <br /><br />For example, the Index marker text would be:<br /><$nopage><min> </>Third, <Emphasis>see Second[Third]<br /><br /><min> is a character format (should be present in the Index file), such as: all As Is, Size: 2 pt, Family: Arial Narrow, Stretch: 10%.<br />Index term has to be repeated in square brackets, as otherwise the term would be sorted incorrectly because of the tiny space added in front of it.<br /><br />A better approach is to have links pointing to the "See" terms within the index.<br />See http://www.sundorne.com/FrameMaker/IndexRef/indexref.htm for information about a plug-in that helps fix the links created by See/See Also references, so that they point to the appropriate terms within the index (through cross-references) rather than to the source markers.<br /><br />Shlomo Perets<br /><br />MicroType, http://www.microtype.com * ToolbarPlus Express for FrameMaker<br />FrameMaker/Acrobat training & consulting * FrameMaker-to-Acrobat TimeSavers/Assistants

  • Is it possible to write a script for Excel Chart Conversion to an ai file?

    I tried to record a script and it didn’t work. I will attempt to explain what I am doing (and why) and maybe you guys can tell me if it can be done or not. We are working with Excel charts and we eventually put them into InDesign for a print magazine. Here are the steps as best as I can translate. We are using Illustrator CS6 Version 16.2.0.
    1. Copy Chart from Excel
    2. Paste into Illustrator
    3. Fit Art Board to Graphic
    4. Select All
    5. Change Kerning to 0
    6. Select the Background
    7. Select Same Fill Color
    8. Change Color to 5% Black
    9. Select the grid lines on the Chart
    10. Change the Stroke to 50% Black
    11. Save as an AI file
    There is also a scenario where there are multiple charts and we would like to make multiple art boards in the same file.
    I do this for a few reasons: Remove Rich Black, Adjust Kerning, Eliminate any Font Issues, Easier to Scale, and it chokes our rip because there is no link when they are copied and pasted directly from Excel to InDesign.
    Any guidance would be appreciated. 

    no can do, there's no access to mesh point with scripting, sorry about that.
    have you tried Mesh Tormentor? it is free!!!, but I don't know if it will help with your problem
    http://www.meshtormentor.com/

  • Is it possible to make private galleries for clients?

    I am trying to figure out a way to create viewing pages for my clients
    and was hoping I could do it through iweb.
    Possible?
    Thansk

    You can do it thru iWeb or iPhoto's MobileMe galleries.
    With iWeb create a separate web site for each client and password protect the sites with separated user names and passwords using the Inspector/Site/Site pane:
    Click to view full size
    You can then add hyperlinks to each client's site to a page in your public site.
    Using iPhoto's MobielMe Galleries create a gallery and set it to be hidden from your other galleries under the Advanced settings panel. Use the Album viewable by: menu to set up custom usernames and passwords and then assign them to the appropriate MMe gallery. Probably to make them easy to remember which applies to which gallery include the clients name in the username somehow.
    Click to view full size
    Then create a link to each of the MMe galleries on one of our iWeb public pages.
    OT

  • Is it possible to make an icon for a movie on the home screen?

    Is there a way to make a direct icon for movie instead of going into the "Videos" icon? 

    If there is a website that plays your movie, then you can go to safari, type the website in, open the page, then tap the share arrow, then tap add to home screen. Thats as close to it that you can get.

  • [IOS-Android] Is it possible to make flashbuilder listening for usb debugging without re-packaging an app ?

    With big apps it's boring to wait 10 minutes to package ios app just to be able to retry something. Is there a way to make flash builder listen for usb debugging like after the debug packaging bug without re-package ?

    Just FYI, Whatsapp is not free indefinitely even on Android phones. They give a one-year trial period after which you have to pay per year for the subscription (a miniscule amount, but you have to pay nonetheless), whereas with the iOS app you pay once up front and then don't have to pay again. So in the long run, the iOS version comes out cheaper (at least unless Whatsapp changes their pricing model). And also just FYI, Whatsapp doesn't work on the iPod touch, only on the iPhone.
    In any case, as planb77 said, pricing is totally up to the developer of the app. It's completely the developer's choice what price to charge for an app.
    Regards.

  • Is it possible to make a template for DVD-SP?

    I know I can make templates in Motion and send the finished product eventually to DVD-SP, but can I make a template with drop-zones etc specifically to work with DVD-SP?
    I made one in Motion but the drop zones won't work in DVD-SP like they do with the existing templates.
    Thanks,,

    Sorry for not understanding the part about template creation outside of DVD SP.
    Basically, I create templates as above, (in DVD SP) with place holders for those effects that apps like Motion creates. It really isn't that much more work, once the place holders are present in a DVD SP project file, to add those assets to DVD SP from other apps.
    I personally have all of the links between the tracks and menus already in place and then just drop in the assets in the existing tracks and menus, once added I do a build, simulate and almost always am able to burn immediately. The only menus I have to generate are the scene selection menus, (which DVD SP automatically creates from a menu template I've already lay out in in the custom menu, templates tab. The scene selection menus almost never need any help, due to placement of elements in the custom menu template I created originally for this project/template file.

Maybe you are looking for

  • How do I create a new playlist when all four options are not available

    I'm running iTunes 11.1.5 under Mavericks 10.9.2. Because I have a very large music collection I keep it on an external drive. I have six recorded lectures I'd like to sync with my iPad. How do I create a new playlist based on the recordings on the e

  • Safari unable to launch - Yosemite

    Having issue with a work computer that wont launch Safari. Not sure if its a Yosemite issue or Ad-Injection issue. I've tried to remove the preferences and application support files with the above threads. Couldn't find any of the ad-injections and r

  • History Attributes when using Custom Authentication Type

    assigned all History Attributes (in the Entity Object Editor) to my audit columns. During run time, I find only Created By is assigned the SYSDATE, and Created On, Modified On, and Modified By are null. I am using Custom Authentication Type. I have r

  • Auto update win7

    Is anyone else seeing this? I  understand Adobe feels an occasionally used doc viewer is oh so  important it must update NOW and restart the system like a win service  pack or something but come on! Isn't the P in Pdf for portable? How  about a porta

  • Need help with Expression

    I need to search and replace several Title Tags with information such as "<b>Almond Oil (5 ml)</b> </font> <hr size="2" noshade>" (without quotes). What expression do I use to indicate "everything between the >b> and </b> as this information changes?