change of script with grep

When the image how this make

app.findGrepPreferences = app.changeGrepPreferences = null;      
app.findGrepPreferences.findWhat = "(\\t\\<A\\)\t\.+\r)(\\t\\<B\\)\t\.+\r)(\\t\\<C\\)\t\.+\r)(\\t\\<D\\)\t\.+\r)(\\t\\<E\\)\t\.+)";
app.findGrepPreferences.fontStyle = "Regular";
app.changeGrepPreferences.changeTo = ???
app.activeDocument.changeGrep(); 
app.findGrepPreferences = app.changeGrepPreferences = null;

C1.jpg

Hi hamdifem,

This should do the job:

app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = '\\t(\\u\\))\\t';
//app.findGrepPreferences.fontStyle = "Regular";
app.changeGrepPreferences.changeTo = '$1 ';
app.activeDocument.changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;

Have fun

Tags: InDesign

Similar Questions

  • How to find and change in InDesign with GREP?

    Hello

    I'm working on Indesing with 100 + page at the same time and in this case use 'find & change' option for faster work. I found an application for "GREP" [find what: (\d)([\|\u]) | [() [\|\u]) (\d)) ] who find them number with character and the character with numbers. see in the picture below...

    Screen Shot-1.jpg

    Now, I want to change "GREP" code to add a sixth space in bwtween figures with the character and the character to the number. For more details, see photo below...

    Screen Shot-2.jpg

    can any buddy help it at the same time & the same query?

    Try the thius on a copy of the file, because it can have unintended consequences:

    Find \d(?=\u)|\u(?=\d)

    Replace $0 ~ %

  • Point to add to the script or Grep Style?

    Hello

    Is it possible to add a hightlight to a script?  Basically, what I want to do is highlight the text and the tricky part is that the text changes size depending on the size of the file, we are working on that.  I want to highlight automatically the "FOR PROFESSIONAL USE ONLY" the way that we do now is to underscore that in the menu options underscore: say my font size is 8, leading 9.6 (these will always change).

    Weight: = 9.6

    Shift: = - 8*.33

    Color = yellow

    It's the way we do now.  Can it be scripted or Grep style which will automatically do this for certain lines of text only?  And no matter the font size calculate what he needs to do if its 2pt, 10pt 100 PT etc... It will highlight the text specified correctly?

    I hope it's possible...

    Thank you

    The lower one is best.

    I remove a bug and also if not 'what' is provided to the point function culminating and there is no entry in find it which is the find panel of text and text is selected, then this text is highlighted.

    An idea in the script is that a shortcut can be applied to it and it will get its information from the Panel of text search.

    So for now to change the answer to this one

    // Highlight function by Trevor
    // http://creative-scripts.com
    // Custom Scripts for Adobe InDesign, Illustrator and a lot more
    // Beta Version 1
    // https://forums.adobe.com/message/8898663#8898663
    
    function highlight(what, color) {
        var range, s, doc;
        doc = app.properties.activeDocument;
        if (!doc) {
            return 'No Active Document';
        }
        s = app.selection && app.selection[0];
        range = (s && s.properties.underline !== undefined && s.characters.length) ? s : doc;
        app.doScript(f, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Highlight Text');
    
        function f() {
            var finds, find, l, leading, pointSize, currentChangeProps;
            color = color || app.activeDocument.colors.itemByName('Yellow');
            // Store current find change text settings
            currentFindTextWhat = app.findTextPreferences.findWhat;
            currentChangeProps = app.changeTextPreferences.properties;
            what = what || currentFindTextWhat;
            if (what !== '') {
                // if no what is provided then the current entry in the find text panel will be used
                app.findTextPreferences.findWhat = what;
                app.changeTextPreferences.changeTo = '';
                app.changeTextPreferences.underline = true;
                app.changeTextPreferences.underlineColor = color;
                finds = range.findText();
                range.changeText();
                l = finds.length;
                while (l--) {
                    find = finds[l];
                    leading = find.leading;
                    pointSize = find.pointSize;
                    leading = pointSize * find.autoLeading / 100;
                    find.underlineWeight = leading + 'pt'; // This is presuming that font and leading size is set to points!
                    find.underlineOffset = (pointSize - leading) * 1.5; // The 1.5 might need tweaking but seems to work well
                }
                app.findTextPreferences.findWhat = currentFindTextWhat;
                app.changeTextPreferences.properties = currentChangeProps;
            } else if (range !== app.activeDocument) {
                leading = range.leading;
                pointSize = range.pointSize;
                leading = pointSize * range.autoLeading / 100;
                range.underline = true;
                range.underlineColor = color;
                range.underlineWeight = leading + 'pt'; // This is presuming that font and leading size is set to points!
                range.underlineOffset = (pointSize - leading) * 1.5; // The 1.5 might need tweaking but seems to work well
            }
        }
    }
    
    /***************************************************************************************************************************************
    ** If text is selected then the "highlighting" is only applied within the selected text                                              **
    ** Otherwise the "highlighting" is applied within the whole document                                                                **
    ** One could change this to apply to what ever is selected in the Find text document if one wanted to                                **
    ** To highlight the word(s) in the find text panel just use highlight(); or highlight(undefined, app.activeDocument.swatches[5]);    **
    ** One can use highlight('Foo'); to highlight "foo" and ignore what's in the find text panel                                        **
    ** The formating / styles etc. for the find are taken from the find panel                                                            **
    ** If one provides a swatch as the second argument highlight(undefined, app.activeDocument.swatches[5]); that swatch will be used    **
    ** otherwise yellow will be used                                                                                                    **
    ** If one provides a swatch as the second argument highlight(undefined, app.activeDocument.swatches[5]); that swatch will be used    **
    ** If text is selected and what argument is given and the find what in the find panel is empty then the selected text is highlighted **
    **************************************************************************************************************************************/
    
    highlight();
    
  • Script or GREP?

    I use InDesign CS5 (CS6 on order). In my paper, I have 9 numbers i.e 123456789 strings. I want to find a way to globally convert these strings in the format 123 45 67-89. Seems simple enough! In research on the scripts and greps (I never use greps, or wrote a script), I can't determine which would be the best way to achieve this.

    Find/replace > grep tab

    Search: (\d\d\d)(\d\d)(\d\d)(\d\d)

    Change to: $1 $ 2 $3-$4

  • Help with GREP

    Hello world!

    I need assistance with grep style.

    I want to apply a character with "BOLD" for each text style, in a specific paragraph style, Reed media before uppercase.

    For example:

    -Za ispušta proizvod u CIJEV ZA OBLIKOVANJE vaganje Sustav (1)...

    Must be:

    -Za ispušta proizvod u CIJEV ZA OBLIKOVANJE vaganje Sustav (1)...

    Can someone help me?

    Try this one: find \u[\x20\u]+? ( ? =\()

    In other words,.

    \u followed by capital

    [\x20\u]+ one or more space (\x20) or a capital]

    (? = \x20\ () followed by a space and an open parenthesis - but don't capture the spece and the parenthesis)

    In the format change Panel, set "BOLD".

    Peter

  • Cannot change 1 advanced with PowerCli

    Hello

    I prepare our ESX 3.5 infra to migrate to vSphere4. of course, I adapt to my powershell script.

    one of them is the basic configuration of our new ESXi.

    I'm stuck in a strange. I mean my script changes several options with no problems, but when I try to change the

    Mem.HostLocalSwapDirEnabled

    from 0 to 1, I threw a:

    Exception calling "UpdateOptions" with '1' arguments: 'a specified parameter was not correct.

    "

    To: line: 237 char: 21

    + $optMgr.UpdateOptions < < < < ($optarr)

    Here is my code:

    $tgtkey = "Mem.HostLocalSwapDirEnabled".

    $tgtvalue = 1

    $optMgr = get-view-Id $ESXHostView.ConfigManager.AdvancedOption

    $optarr = @)

    $option = new-Object VMware.Vim.OptionValue

    $option.key = $tgtkey

    $option.value = $tgtvalue

    $optarr += $option

    $optMgr.UpdateOptions ($optarr)

    This change works well against esxi 3.5. I check that the option has not changed.

    any ideas would be most welcome.

    Thank you very much

    Eric

    Hi Eric,.

    Don't know why or where it is documented, but this setting seems to want an int64 value, where it used to be an int32.

    It works in vSPhere

    $ESXHostView = Get-VMHost mmmstv004.muac.corp.eurocontrol.int | Get-View
    $tgtkey = "Mem.HostLocalSwapDirEnabled"
    $tgtvalue = [int64]1
    $optMgr = Get-View -Id $ESXHostView.ConfigManager.AdvancedOption
    $optarr = @()
    $option = New-Object VMware.Vim.OptionValue
    $option.key = $tgtkey
    $option.value = $tgtvalue
    $optarr += $option
    $optMgr.UpdateOptions($optarr)
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Can I change hard drive with an SSD in Toshiba NB100?

    Can I change hard drive with an SSD in Toshiba NB100?
    The hard drive in this model is the same size as SSD 2.5 drive "?

    Hello

    As far as I know the laptop supports the disk HARD 2.5 SATA.
    I think you could use a SATA SSD drive. Usually some SSDS require the firmware update but this should be provided by the manufacturers of SSD drives.

  • My screen iphone6 is cracked and in my country, they can only change the iphone with a new one and with a very high price. Is there anyway that I could replace just the screen?

    My screen iphone6 is cracked and in my country, they can only change the iphone with a new one and with a very high price. Is there anyway that I could replace just the screen?

    No, if you want to keep all rights to the service or support from Apple. Not to mention the fact that it then will be bork Touch ID and make the phone unusable if ever, you restore or update of iOS.

    Apple doesn't sell parts of the iPhone. There is no legitimate sources for replacement screens.

  • How to change two photo with Boolean control?

    Hello

    I want to change one image with another photo or change the color of an image with a Boolean control. is this possible?

    How?

    Best regards.

    In this case using a Pict control ring (from the palette of the ring & Enum) is probably the easyest way if you don't need to load images dynamically. To dynamically load, you can use a 2D (from the chart - controls palette) image control.

    Ben64

  • How can I change the script on my windows live mail in English after it being hacked

    my windows live has been hacked. I decided to go back inside. But unable to change the script back to English.

    Windows Live Mail questions belong here: http://windowslivehelp.com/product.aspx?productid=15

  • HP Deskjet 710C does not print colors (also after changing the cartridge with a new one)

    HP Deskjet 710C on Windows XP

    Problem: Printer does not print color. Black printing works. It also does not print color now, I changed the color with a new cartridge. Remove the printer from Windows XP and reinstall also does not resolve it. Also by using the option in Windows/printer driver for the cleaning cartridge has failed. Anyone know a solution to this?

    There is a document about the lack of color of the issues on the printer Deskjet 710C that can be found here.

    I hope this helps!

  • Is it possible to run the command script with user account administrator rights?

    Is it possible to run the command script with administrator user account rights means please tell me how to...

    I need to run it in windows 7 professional service pack 1.

    There are a few myths that won't go away, for example

    • You can perform administrative tasks when you are working from a command prompt.
    • A script (batch file, VBScript, PowerShell) gives you administrative rights.

    There is no substance to a myth. Your account has administrator privileges, or it does not. There is no backdoor.

  • can I use waiting fuction in java script with qml

    HII guyzz... How to use the wait in java script with QML function as if it takes 20 minutes to perform a specific operation or a process after that battery is 100%

    You are better off using QTimer for something like that.

  • Another user changed the row with a primary key oracle.jbo.Key]

    I see many discussions about this error, but still cannot understand the difficulty that I need in my scenario.

    I am an Oracle Developer and completely new to ADF, please bear with me.

    I use JDeveloper 11.1.1.9.0

    My scenario:

    Creates an object editable view (UVO) with sub selects in the query, which is from several db tables.

    Creating a table using the UVO

    When I try to update a field in the table, and then click the validate, I get the error message:

    Another user changed the row with a primary key oracle.jbo.Key]

    Can someone explain in what scenarios I see this error and how do I solve this problem?

    Try the viewObject execution after validation and reQueryOnCommit set to true

    For details see - binary: a reason more for "Houston-25014: another user has modified the line containing oracle.jbo.Key primary key '

    Ashish

  • Is it possible to use a script with groovy activity code in a versioned project?

    Hello, we are trying to use script with groovy code activities. We use subversion to keep and share code between developers. (we are versioning projects, no applications)

    When a developer creates a script everything works fine until the code is only in the local workspace.

    When the developer commits new code (the XXX.gy file, the XXX.bpmn file and the XXXdocumentation.xml) and an another laurys the new file to the workspace, the script will not work. The activity of script will have an alert icon saying that "the method called in zzzz script does not exist.

    This happens always, except when a developer deletes its project and it checks entirely from svn.

    UPDATE:

    We discovered that some references to the identifier of the script are stored in database files in the .data file. This file is not versioned when versioning applications and we do not know if it's a good idea to release it. But without updating this data will not be found scripts...

    Is there a patch for this?

    Thank you

    OK, discovered, you need to remove the .data directory and restart jDeveloper

Maybe you are looking for