Is there a script for applying a certain style to several thousands of words arranged in a list?

Hello, I have tried using FindChangeByList, but I'd pretty much do all the work of pasting every word on the brackets, so i could as well apply the styles by hand.
So my project involves applying the same style to around 11 thousand words that appear in a book. Those words are mostly names and brands, and they appear throughout the whole text, so applying that style manually would be quite time-consuming.
I have those words set aside in a list.txt
Does anyone know if I could use that in any script and apply the style automatically?
Like I said, pasting every single word into FindChangeByList is out of the question, just like applying the style word by word, it would take forever...
...thanks!

Okay, for anyone that might be interested in this as I was, I found a solution.
If you want to have a particular text expression on your .txt list to be used as a search parameter by your script, here are a few tips:
Let's say you want to add the following 2 expressions on your list, without the quotation marks:
a) "test, test."
b)"[test] {test}"
1 - Like Jongware said, you MUST abide by GREP syntax.
2 - If you want to put an expression on your .txt list that DOES NOT uses characters that represent GREP syntax (example a) with regular text, commas and simple punctuation), you may simply add them to your list between parentheses:
     a) (test, test.)
3 - If you want the script to search for an expression that DOES CONTAIN characters that are also used by GREP syntax (example b) you can try stuff like:
     b) (\p{Ps}test\p{Pe})
     note the parentheses, because it's a specific text expression
     then note the \p{Ps} and \p{Pe} that mark opening or (s)tarting and closing or (e)nding punctuation such as brackets, braces, parentheses...
Here is a file with the GREP expressions that helped me solve my problems:
http://www.kahrel.plus.com/indesign/grep_mapper.pdf
Although this is a very specific matter and probably easily solvable by all the professional scripters here, I thought I'd share it since it took 3 whole days of studying for me to conclude everything.
Thanks again, specially to Jongware

Similar Messages

  • How to find the existing sql server backup plan/schedule is there a script for that?

    Friends,
    Is there a easy way to find out in SQLServer (for All DB's) what is the current backup plan/schedule ? is there a script for that?
    Thanks,
    Karthikeyan Jothi

    To check the database backup 
    Select
    SERVERPROPERTY('ServerName'),
    db.name,
    CONVERT(VARCHAR(10), b.backup_start_date, 103) + + convert(VARCHAR(8), b.backup_start_date, 14) backup_start_date,
    CONVERT(VARCHAR(10), b.backup_finish_date, 103) + + convert(VARCHAR(8), b.backup_finish_date, 14) backup_finish_date,
    case
    when (DATEDIFF(hour, b.backup_start_date, getdate())<24)then 'Success'
    when (DATEDIFF(hour, b.backup_start_date, getdate())>=24)then 'Failed'
    end Status,
    DATEDIFF(hh, b.backup_finish_date, GETDATE())BackupAgeInHours,
    (b.backup_size/1024/1024/1024 )BackupSize,
    case b.[type]
    WHEN 'D' THEN 'Full'
    WHEN 'I' THEN 'Differential'
    WHEN 'L' THEN 'Transaction Log'
    END Type,
    ISNULL(STR(ABS(DATEDIFF(day, GetDate(),(Backup_finish_date)))), 'NEVER')DaysSinceLastBackup
    FROM sys.sysdatabases db
    Left OUTER JOIN (SELECT * , ROW_NUMBER() OVER(PARTITION BY database_name ORDER BY backup_finish_date DESC) AS RNUM
    FROM msdb.dbo.backupset) b ON b.database_name = db.name AND RNUM = 1
    where dbid<>2
    OR
    SELECT
    DISTINCT
    a.Name AS DatabaseName ,
    CONVERT(SYSNAME, DATABASEPROPERTYEX(a.name, 'Recovery')) RecoveryModel ,
    COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'd'
    AND is_copy_only = '0'
    ), 'No Full') AS 'Full' ,
    COALESCE(( SELECT CONVERT(VARCHAR(12), MAX(backup_finish_date), 101)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'i'
    AND is_copy_only = '0'
    ), 'No Diff') AS 'Diff' ,
    COALESCE(( SELECT CONVERT(VARCHAR(20), MAX(backup_finish_date), 120)
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'l'
    ), 'No Log') AS 'LastLog' ,
    COALESCE(( SELECT CONVERT(VARCHAR(20), backup_finish_date, 120)
    FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY backup_finish_date DESC ) AS 'rownum' ,
    backup_finish_date
    FROM msdb.dbo.backupset
    WHERE database_name = a.name
    AND type = 'l'
    ) withrownum
    WHERE rownum = 2
    ), 'No Log') AS 'LastLog2'
    FROM sys.databases a
    LEFT OUTER JOIN msdb.dbo.backupset b ON b.database_name = a.name
    WHERE a.name <> 'tempdb'
    AND a.state_desc = 'online'
    GROUP BY a.Name ,
    a.compatibility_level
    ORDER BY a.name
    To check the schedule you can try the below script
    https://gallery.technet.microsoft.com/SQL-Jobs-Complete-eabe0050
    --Prashanth

  • Is there a script for an audio controller linked to an embedded swf?

    Is there a script for an audio player or controller that has some functions like play resume stop for an embedded swf file?  I would use buttons for this purpose but for some reason, when I click on the pause button on the pdf, and then click on resume, playback resumes five seconds before the point at which I paused. And i would prefer to rely on just using the built in player in the pdf but the quicktime player doesn't play the swf smoothly; it freezes.

    iTunes Folder Watch
    tt2

  • Help: apply different para styles to several consecutive paragraphs via script

    Hi all,
    I need to apply different para styles to several consecutive paragraphs via script, something like this (found somewhere on the net):
    var myDoc = app.documents[0];
    var mySel = app.selection[0];
    var myPStyle1 = "A";
    var myPStyle2 = "B";
    //need to add 6 more styles here:
    //var myPStyle3 = "C";
    //var myPStyle4 = "D";
    //var myPStyle5 = "E";
    //var myPStyle6 = "F";
    //var myPStyle7 = "G";
    //var myPStyle8 = "H";
    //the last style not needed in script?
    // apply 1st style to 1st paragraph
    mySel.appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle1);
    // apply styles to paragraphs after selected
    //2nd style
    mySel.paragraphs[-1].insertionPoints[-1].appliedParagraphStyle = myDoc.paragraphStyles.item (myPStyle2);
    //next style
    mySel.paragraphs[-1].insertionPoints[-1].paragraphs[0].insertionPoints[-1].appliedParagrap hStyle = myDoc.paragraphStyles.item (myPStyle2).nextStyle;
    I've tried badly, but can't find the way to extend the sequence
    Sorry, no skills in scripting yet...
    all styles have 'Next Style' option activated, but I can't use 'Apply style, then Next style' or Object styles, because I need four different sequences of those para styles:
    A-B-C-D-E-F-G-H
    A-B-D-E-G-H
    A-C-D-F-G-H
    A-D-G-H
    and I really don't want to create special clones of the same style for each sequence (Keep It Simple, they say ).
    I believe it can be done via four slightly adjusted scripts...
    any suggestions would be greatly appreciated...

    Sorry about being late to the party, I usually pick up stuff like this right away.
    How about this one?
    1. No separate scripts needed, it uses a tiny dialog where you can choose what style set to use. If I'm correct, you can press a number key on Windows to immediately select one of the items.
    2. It works down from the paragraph your cursor is in. It has nothing to do with text frames, though -- consecutive paragraphs inside a story always ignore any text frames.
    3. Extensible: you can easily change the names of the styles in the top array, and the number of style groups in the list.
    var styleLists = [
              [ "A", "B", "C", "D", "E", "F", "G", "H" ],
              [ "A", "B", "D", "E", "G", "H" ],
              [ "A", "C", "D", "F", "G", "H" ],
              [ "A", "D", "G", "H" ]
    var radiobutts = [];
    styleDialog = app.dialogs.add ({name:"Set Multiple Styles",canCancel:true});
    with (styleDialog)
              with (dialogColumns.add())
                        with (radiobuttonGroups.add())
                                  for (i=0; i<styleLists.length; i++)
                                            // Build radio button string
                                            str = "&"+String (i+1)+". ";
                                            for (j=0; j<styleLists[i].length; j++)
                                                      if (j) str += "-";
                                                      str += styleLists[i][j];
                                            radiobutts.push (radiobuttonControls.add({staticLabel:str, checkedState:false}) );
    radiobutts[0].checkedState = true;
    if (styleDialog.show())
              for (i=0; i<radiobutts.length; i++)
                        if (radiobutts[i].checkedState == true)
                                  break;
              if (i < radiobutts.length)
                        par = app.selection[0].paragraphs[0];
                        for (j=0; j<styleLists[i].length; j++)
                                  par.appliedParagraphStyle = styleLists[i][j];
                                  par = par.parentStory.paragraphs.nextItem(par);

  • Is there a script for renaming layers in ID CS5?

    Hello,
    I am new to scripting (I just started today) so far I have found some very useful existing scripts to help automate my workflow. I am wondering if anyone knows of the existence of a layer renaming script for InDesign.
    I have seen similar scripts for PS. I want to learn how to script but I am in need of this one for Monday...
    Thanks in advance!

    Antonio:
      Please remember that we're all volunteers here. If you can ask your question so we can understand it, we can probably help you. But if you cannot, it would take quite a lot of effort on our part to even determine what you asking.
    Jongware wrote in the other thread:
    This is quite a specialized case so it's unlikely there "is" a script. But there "could be" one. Ask in the scripting forum, as there are some people in there sharpening their skills with such requests. Make sure to detail what you need it to do: which layers? rename to what? Et cetera.
    You're not doing a good job on detail. How would the script know what to change your first, 3rd, 4th, and 5th "atoms" to?
    You have given us no information that I can see.

  • Is there a script for changing layer names in ID CS4?

    I have multiple documents with an average of 20 layers in each. Each of the layers is named for the expiration date of the coupon in the ads. When a new order comes in I retrieve the previous files and change the dates via scripts and the Find/Change option. I have looked but cannot find a way to rename the dates in the layers as well.
    Does anyone know of a script for this?
    Thanks in advance!

    E-mail, eh? You're missing out a lot of fun stuff, as there is
    - editing your own posts
    - using bold and italics to highlight important stuff
    - finally being able to shout (some posters think it's necessary to use a large bold font to make their post stand out in the crowd. They are correct, it does. In the Bad way.)
    - inserting images
    - uh, Jive (-- sorry, couldn't think of any more fun stuff to add)
    Visit the scripting forum (using a web browser, s'il vous plait) by clicking here.

  • Script for Applying master Spread

    Hi,
    This Script is for Applying CO-Opener master page  wherever CN is applied, When we run the script, it alerts Sucess.But master spread is not applied . Please resolve.
    var mydoc=app.activeDocument;
    var mypara = mydoc.stories.item(0).paragraphs.everyItem().getElements();
    for(i=0; i<mypara.length; i++){
        if (myPara[i].appliedParagraphStyle.name=="CN"){
               mypara[i].parentTextFrames[0].parent.appliedMaster = mydoc.masterSpreads.item("CO-Opener");
    alert("Master Page applied Sucessfully")

    Hi Math,
    I hope your coding is correct, but it seems stories[0] do not have "CN" Styles.
    Change the below line:
    var mypara = mydoc.stories.item(0).paragraphs.everyItem().getElements(); 
    into
    var mypara = mydoc.stories.everyItem().paragraphs.everyItem().getElements(); 
    Thanks to Jongware and Green4ever.....
    and also the use the below url to get the correct coding for CS4 and CS5 and above
    Apply Master Page using Paragraph Style
    var myDocument = app.activeDocument; 
    var myParas = myDocument.stories.everyItem().paragraphs.everyItem().getElements(); 
    var myPage = myDocument.pages; 
    for(i=0; i<myParas.length; i++) 
        if(myParas[i].appliedParagraphStyle.name == "CT") 
            //Works only in CS5 and later 
            myParas[i].parentTextFrames[0].parentPage.appliedMaster = myDocument.masterSpreads.item("B-Master"); 
            //for CS4 use this 
            //myParas[i].parentTextFrames[0].parent.appliedMaster = myDocument.masterSpreads.item("B-Master"); 
    Regards
    Siraj

  • Is there a script for scaling multiple precomps?

    Hi!
    Is there a script or another good way to scale tens of precomps in one go?
    I just noticed that I need to "grow bounds" to over 20 compositions in order to be able to use an effect on them. Do I need to manually go inside each precomp and change their comp settings for a bigger size or can this be done faster somehow?
    I tried the grow bounds effect, but could not get it to work. What I'm doing is simple: I'm blurring the layers to make them "glow" but for the blur to look nice the layers need to have bigger bounds.
    Any help will be appreciated!

    I used this After Effects Community Help search for 'script scale multiple compositions' and found this:
    http://www.aenhancers.com/viewtopic.php?t=701

  • Is there a script for dimensioning?

    Not just any dimensioning ie: Cadtools,
    Is it possible to have "intelligent" dimensioning inside Adobe Illustrator? For example: If I draw a rectangle 4" wide by 2" high, and I stretch it to 6" x 2" is there a way for the 4" dimension to auto-update to 6" without manually overriding the text? Like they do in autoCad. I've been scouring the web for answers with little luck. I even bought CADtools which is great but doesn't provide this option. Any help/suggestions/finger pointing would be greatly appreciated.

    Nope. Illustrator (you know...this ostensibly "professional" drawing program) doesn't provide even rudimentary "dumb" dimension tools (just as the program still dosen't even provide live geometric shape primitives like any other drawing program under the sun does).
    Cheezy workarounds can be (and have been) devised with scripts to create dumb dimension labels, but updating when objects change really requires special dimension objects. Scripts loose their object-specific references when the script completes, or when the script's palette is closed, unless you code into the script some kind of object labeling, which would become cumbersome real quick.
    If it's a frequent need, you need a proper feature for this, and you're just using the wrong program. Use Draw or Canvas. You can probably buy a competitive side-grade to either of those programs for not much more than you pay for an elaborate plug-in, and get alot more value in the deal.
    JET

  • Script for applying object style to only tif, or eps or...(by extension)

    We need to apply object style to only eps files in doc, or tif.... How to do this? Maybe someone have a script?
    thanks

    @kajzica – I don't have a script for that, but it is scriptable. You surely mean that you want to apply the object styles to the container frame of the images, aren't you?
    A few minutes later – try the following ExtendScript (JavaScript) code:
    You could edit the names of the two object styles at the beginning of the script code.
    OR: you could first run the script, the script will add two object styles to the document that you can edit afterwards.
    The script will sort the EPS and the TIFs from the other image types.
    Make sure that all graphics are up-to-date and linked correctly!!
    //ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx
    //Uwe Laubender
    * @@@BUILDINFO@@@ ApplyObjectStylesTo_ContainersOf_TIF_EPS.jsx !Version! Thu Dec 12 2013 13:15:30 GMT+0100
    //Edit your style names here. Change the name between the two " " only!!
    //OR: edit your object styles in InDesign after running the script.
    var styleNameForEPS = "EPS-Containers-Only";
    var styleNameForTIF = "TIF-Containers-Only";
    app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
    app.doScript(_ApplyObjectStylesToContainers, ScriptLanguage.JAVASCRIPT, [], UndoModes.ENTIRE_SCRIPT, "Apply object styles to containers for TIF and EPS graphics");
    function _ApplyObjectStylesToContainers(){
    var d=app.documents[0];
    var allGraphicsArray = d.allGraphics;
    if(!d.objectStyles.itemByName(styleNameForEPS).isValid){
        d.objectStyles.add({name:styleNameForEPS});
    if(!d.objectStyles.itemByName(styleNameForTIF).isValid){
        d.objectStyles.add({name:styleNameForTIF});
    for(var n=0;n<allGraphicsArray.length;n++){
        //The EPS case:
        if(allGraphicsArray[n].getElements()[0].constructor.name === "EPS"){
            allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForEPS);
        //The TIF case
        if(allGraphicsArray[n].getElements()[0].constructor.name === "Image" && allGraphicsArray[n].getElements()[0].imageTypeName === "TIFF"){
            allGraphicsArray[n].parent.appliedObjectStyle = d.objectStyles.itemByName(styleNameForTIF);
    }; //END: function _ApplyObjectStylesToContainers()
    Uwe

  • Is there a script for this?

    Hello,
    I have a 176 page pdf that has black type throughout, a lot of those pages also have boxes filled with black. I need to change the boxes to rich black but leave the type black only. I tried using actions but it changes both since they have the same fill. I posted this on the creating and editing forum and got no reply, so I'm assuming it may not be possible. Is there possibly a script to do this?
    And if there is could someone talk me through using it. I've used scripts in Indesign but have no clue how to apply them in acrobat.
    I'm on a Mac using Acrobat 9 Pro.
    Your help is much appreciated,
    Patty

    Thanks for the response Gilad.
    Sorry it has taken me a bit to get back to you. I work for a printing company and don't always get time to "play around" with things.
    I did try your suggestion of color convert with no good results. The boxes and the type have the same fill color and selecting any object
    or line art would also change the type. Also tried changing just the type and both change. Not sure why.
    I do very much appreciate your suggestion.
    Thank you,
    Patty

  • [CS3-CS5|JS] is there a script to apply creep to artwork?

    I work for a commercial printer and we have RIP software which, when requested, applies creep to impositions. it literally pushes the pages in the imposition closer to the spine in increments of the total creep calculation.
    Out of curiosity more than anything else, has a script like this been made to apply creep directly to indesign native files? If not, how difficult would it be to adjust the default "adjustlayout.jsx" script to instruct it to behave this way?
    Message was edited by: cdflash
    did find a link to an iphone app: http://boundlessideas.com/creepcalc/index.html
    don't know if it works though as i don't have an iphone :( . also sounds like it simply adds guides which reflect the creep, rather than shifting the content.
    this all came about after a DL portrait saddle-stitched print job came in with a running footer which was a swash-like crossover on every page, so creep could not be applied using the RIP (as the pages were closer to the centre spread the swash lined up less and less). instead, all content EXCEPT the running footer had to be crept in page by page in different increments for each page.

    @ John Hawkinson
    your suggestion is SOOOOOO close... but still trying to iron it out.
    by adjusting line 134 to be
    myAdjustPage(myPage, myEvenX*myPageValue, 0);
    and line 138 to be
    myAdjustPage(myPage, myOddX*myPageValue, 0);
    the pages do move incrementally... but not how i'd hoped. I'm still keeping the myEvenX and myOddX so that I can type the creep figure into the UI.
    instead of pages 1 & 2 staying where they were and pages 3 & 4 moving the one incremental value as input in the UI, what happens is page 1 stays where it is, but page 2 moves in by one increment, page 3 moves in by two increments, page 4 by three increments etc... What am I missing here?
    I have been adjusting these lines in the script since and am getting interesting results, but not the results that I need as illustrated in the last paragraph.
    as I said in my earlier post, i've devised a javascript to calculate the creep increments, but haven't been able to upload the file anywhere. I can however cut and paste the "engine" of it here:
    var leaves = (form.pages.value * 1) / 4
    var creepdecimal = leaves * (form.thickness.value * 1)
    var leavestomove = leaves - 1
    var movedecimal = creepdecimal / leavestomove
      form.creep.value = creepdecimal.toFixed(3)
      form.move.value = movedecimal.toFixed(3)
    so the actual HTML calculator simply asks for the amount of pages (with an extra javascript to ensure only amounts divisble by four are entered) and the thickness. Once submitted, the calculator returns the overall creep value and then the page increment value.
    apart from that, it'll be a winner... at least until the centre spread. I did originally think "I'm not too worried about making the script so it magically works on reverse from the centre of the book, i can just tell the script to run from pages 1-X and then run the script again from X-End using reversed values" but i can't do that because the pages after the centre of the book wouldn't have gone anywhere, and simply running the same script again with reversed values wouldn't work.

  • Is there a script for apache to automatically make a "download as tar"

    link?
    For example if you run apache and set /some/folder as documentRoot, if there is no index.html or .php there it will display the folders and files.
    I want to make apache also display a link for eveyr folder such as "Download as tar" and it would automagically tar the folder and offer for download.
    Possible?

    Generally speaking, if a script doesn't run in a later version, you can put it in a subfolder withteh correct version number as the name and it will work. For CS3 that would be "Version 5.0 Scripts" without the quotes.
    That said, if you have Acrobat pro, it's probably easier to use the extract pages command...

  • Is there a script for CS5 to export a multi-page InDesign Document to single page InDesign documents

    Hello,
    I am having trouble finding a script or utility that would allow me to export each page of an InDesign CS5 document as multiple single page InDesign documents. I have found one script that does this for CS3, but nothing for CS5. Thank you for any help.

    Generally speaking, if a script doesn't run in a later version, you can put it in a subfolder withteh correct version number as the name and it will work. For CS3 that would be "Version 5.0 Scripts" without the quotes.
    That said, if you have Acrobat pro, it's probably easier to use the extract pages command...

  • HT1347 Windows: Is there a script for adding a folder to an iTunes Library at startup?

    Has anyone ever created a script to have "watched folders" functionality in iTunes?
    Three out of the four users in my household share the same iTunes library folder, which resides on a separate hard drive (along with the iTunes Library of the 4th user). I thought this would be the easiest way for all the music purchased for our family to be shared among us, while not sharing playlists. I thought iTunes would, automatically and routinely, scan and categorize the files in the designated iTunes Media Folder.
    However, now whenever someone adds music through their account, the songs will not show up in another user's library (even though both accounts use the same iTunes Media Folder). The only way to have an up-to-date library, is to go to "File" > "Add Folder to Library..." and add the iTunes Media folder each time a user starts their iTunes instance.
    I'm new to iTunes (moving over from WMP and VLC).
    Just in case anyone cares... I'm using:
    - iTunes 10.7.0.21
    - Windows 7 Home Premium 64-bit (with Service Pack 1)
    - We have an iPhone and an iPod touch in the household

    iTunes Folder Watch
    tt2

Maybe you are looking for

  • Mandatory partner function at sales order item level

    Hi all, I'm customizing partner schema at item level for sales order. I have created a custom partner function, I put it in a new sales order item partner procedure and i set this partner function as mandatory (I want that system show me a message if

  • Trying to import .dmd file and want to see the logical & physical diagram

    Can some one guide me how to import a .dmd file which i got from client. In my local machine i downloaded datamodeller and installed. When i am trying to import the same, i am not able to see any logical or physical relationship diagram. Thanks inadv

  • Notes folder disappeared from mail icloud in browser

    It just disappeared from icloud in browser but it shows in my devise. "Sync notes" is swich on. It always works till tooday. I did nothing to get this I need to appeare the notes folder in my mail icloud (browser) just like it was

  • How can hide the buttons based on condition

    Dear all I have to hide the button based on condition When I open the third page directly I want to hide that button When I open the third page via first and second page I need to visible that button I pass spell parameter from first to second and se

  • Posting movies from iPhoto to MobileMe Gallery

    I have a few 5-8 minute videos taken from a pocket Canon camera that I would like to export to my MobileMe Gallery. How do I downsize the video in iPhoto before I publish the album to the gallery? Right now a subscriber to the gallery has to painfull