remove character style color swatch

Hello

I'm doing a search/replace using the script to remove the fill color of a character style.

So far I have to replace the current color by zero, using this:

app.changeGrepPreferences.fillColor = myDocument.colors.item ("None");

But what I really need, is replaced by the question mark symbol, as below, so he can inherit from another color that I applied via a grep style.

empty.png

To do this manually in Indesign I would control + click on the shade.

I spent the last few days looking for the magical forest of code I'm missing with no luck, I hope you guys can help.

See you soon,.

John

Hey John,

Try this one:

app.changeGrepPreferences.fillColor = NothingEnum.NOTHING;

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Tags: InDesign

Similar Questions

  • background color in the character Style

    Hello

    Can I add padding and background color in a character Style?

    Thank you

    Not both.

    Is the common trick to add a background color to the underline for a very thick line (about the width of your leader) and the appropriate color and set the offset to move "up" behind the text (the default is to descend to the base of his thick line).

    You can not add padding left and right in a character style, you need to add some spaces (thin, or what you need) by hand.

  • A character style that puts in shape all negative numbers (-10) with red color

    How to set a character style that formats all negative numbers (-10) with red (a predefined text style)?

    I guess that I should be using GREP, but it's kind again for me and I can't find an answer to this on google.

    -\d+?,\d+?\%|-\d+?

    seems to work

    GREP is synonymous with General Regular Expression Parser - large print receive codes and you insert the code to highlight the characters you want to

    In the that I provided above is probably not the nicest way to do it, but I'll break it

    -= minus sign

    \d = any digit

    + = Continue until there are no more numbers

    ? = off at the end of a group of numbers

    This means find any number within a group of numbers

    just means a comma

    and yet once I wanted to find any group of numbers with \d+?

    % means with a percentage at the end sign

    -\d+?,\d+?\% means find: sign, followed by a group of digits followed by a comma followed of another group of numbers followed by the percent sign.

    | [vertical] means OR

    -\d+? would be to find a

    -

    Group of figures

    -\d+?,\d+?\%|-\d+?

    All means find any group of numbers separated by a comma with a sign of percentage at the end OR a sign less with a group of figures.

  • Removal of text box character style

    I have a CS3 document that has about 10 styles of characters - whose is Fig_ref. whenever I have to draw a text box, it automatically to the text with this style of character styles. I have to go to the menu drop down and select None. Is there a way to force the default value to "None"? Thank you.

    With no text selected, go to the character styles and select None.

  • Is it possible to add text to the cells and apply the character style in the cell

    I work in InDesign on Mac 5.

    I have two tables of formatting with information that will be eventually combined. I implemented the scripts I found on these forums to add the columns needed, merge lines and fill the cells merged with the appropriate color, but can't two remaining tasks.

    1. is it possible to add text to a cell of some?

    2 and it is possible to apply a character style to cells? (different cells than those that I need to add some text)

    I played with this code but do not know if it is even close...

    {

    table. Rows [0]. Cells [0]. InsertText (' CS/PS");

    }

    {

    table. Rows [0]. Cells [0] .appliedCharacterStyle ("bold");

    }

    Here are the scripts that I have combined so far for the table...

    Add column

    myTable = app.selection [0];

    MyColumn = myTable.columns [1];

    for (a = 0; < 1; a ++)

    {

    myTable.columns.add (LocationOptions.AFTER, myColumn);

    }

    Merge lines

    table = app.selection [0];

    If (table.hasOwnProperty ("baseline") table) = table.parent;

    If (instanceof cell table) table = table.parent;

    If (instanceof column table) table = table.parent;

    If (instanceof row table) table = table.parent;

    If (instanceof Table table)

    {

    table. Rows [0]. Cells [0]. Merge (table.rows [0] .cells [1]);

    }

    {

    colours alternating in merged lines

    r = table.rows [1];

    n = app.activeDocument.swatches.item ("orange");

    b = app.activeDocument.swatches.item ("PANTONE 3005 C");

    for (c = 0; c < r.cells.length; c ++)

    {

    If (c & 1)

    r.Cells [c]. Properties = {fillColor:b};

    on the other

    r.Cells [c]. FillColor = n;

    }

    }

    Hello

    1. If you want to add the text, go further in:

    table. Rows [0]. Cells [0] .insertionPoints [0] .silence = ' CS/PS;

    2 similar with application of styles:

    table. Rows [0]. Cells [0] .texts [0] .appliedCharacterStyle = "bold" / / If this style is present in your doc

    Jarek

  • I'm looking for links Hypertext in find/replace the dialogue (without applying a character style).

    I have 7000 hyperlinks in my document, with different character styles ("italic", "bold" and "italic +"BOLD""). I need to apply the blue color to each of them. If I ask a new character style "hyperlink" to all, I'll lose my formatting.

    Is there a way to find hyperlinks (for themselves, not their format) dialog find/replace in order to create and apply 4 different character styles ('hyperlink_regular', 'hyperlink_bold', 'hyperlink_italic' and ' hyperlink_bold + italic")?

    Sorry for my English, thanks for the help!

    Use Javascript!

    You can use this Javascript, for example. (Instructions on how to use a JavaScript in InDesign can be found elsewhere).

    blue = app.activeDocument.swatches.item("Blue");
    for (a=0; a
    

    Take care to provide the correct color swatch name in the first line.

  • Character style to ignore the outline

    Hi all!

    When you create a style of character (InD CS3) on the characters of color of the dialog box section outline and fill shows like question marks. I guess that means that the character style will not change the outline.

    However, I can't find a way to RETURN to that State "do not change" after doing something else. I solved the problem by synchronizing this InD file with another that has the unmodified style so that the plan does not change when the style is applied.

    I'm missing on this dialog box which allows you to set the style of back on NOT changing the contour?

    Thanks a bunch!

    Ken

    Command-click (Ctrl-click for Windows) on the name of swatch.

  • Automate the character styles?

    Tuesday morning, I sit and one hundred and fifty summer events to pop in a leaflet. Choice is easy - I can print them and type them. In the shower, however, I started thinking about choice B, and I don't know if InDesign can do what I want.

    I have control over the database where they are hosted, and it is quite easy for me to pop in the format

    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~
    Date - time [CR]
    Name of the event
    ~~~~~~~~~~~~~

    What is all the information I need on this document. On the finished product, I'll Date and time to have character styles applied (for color and weight). It is not difficult for me to assign keys quick access to styles of character and to make this hand - twenty minutes of boredom.

    But!

    Could format that

    (where the symbols are just unique symbols)

    ~~~~~~~~~~~~~
    ªDate - ∞ £ time [CR]
    Name of the event
    ~~~~~~~~~~~~~

    and then use a find/replace to tell InDesign

    -in the case of 'ª... ". ∞ ", apply the style of character 'Style of Date'

    -in the case of "£...", apply the style of character 'Time style' "

    and then go through and remove all instances of ª ∞, £ and

    ?

    (Additional spaces applied for ease of reading)

    Or, if I'm imagining this wrong, is there another way I can format the original data to automate the application of styles?

    Even I don't think that you would need to grep for that.

    I would create two paragraph styles, one for the date and time with the following style being the name of the event and the name of the event, including the next style time.

    Then create a character for the time style and have the paragraph style base for date/time, or just for the date of the formatting you want.

    The style of time date would have a style nested with none by the hyphen and the time until the end of the paragraph.

    Place the text and then select everything from him and in paragraph styles, right panel click on time and in the context menu, choose apply date/time and following.

    Who must fully put in shape all your text.

    Bob

  • Character styles do not work in Pages

    I'm on a MacBook Pro (13-inch, mid-2014, retina), running 10.10.5 (14F1021) and run pages v. 5.6.1

    It's pretty simple: I'm searching the internet apple documentation and Web sites.

    To the title of the pane 'format' to the right of the workspace, there is an option below 'police' called 'Styles of character ".  There is no way, in this latest version, to create a new character style.  No selection there will allow you to press the symbol '+', and there is no menu in the menu bar you option to create a character style.

    Despite trying several ways of dozens to understand this point, there is no work around.  I think it's a bug.

    Please fix this Apple?  I love the pages, but boy, this can be frustrating.

    Thank you!

    I use Pages on El Capitan 10.11.1 v5.6.1. I can define a character style.

    Try the following:

    1. Type a word or two. Select them.
    2. Press command + T to launch the Panel font
    3. In the toolbar, click the selector bar and in this menu, choose color
      1. Choose red
      2. Unique, choose the menu bar (you now have a single, red strikethrough)
    4. Selected always your text
      1. Click Character Styles picker
      2. The + symbol is now blue
        1. Click on + to add
        2. Change the new name of red bar, then press return to set.
      3. Click on any character Style
      4. Click the character crossed Red style to test.

    If you want any style of character custom for later use, you will need to make a custom template for new documents, or simply a model of style that you can open separately and then using the Format menu, styles of copy/paste between your model as well as the current document.

  • best judgment for paragraph styles, object styles and character styles

    I want to learn the criteria difference and use of paragraph styles, object styles and character styles. I know how to use them, but know about the best judgment and context, when you use would be better. Can anyone recommend links? I've been using adobe. Please don't suggest books.

    Paragraph styles are whole paragraphs.

    Character styles are letters or isolated words. Do not use the long of an entire paragraph. Do not set all the attributes, only those who are different for the properties of the paragraph Style. Unlike Quark Xpress, in InDesign are character Styles used only for the difference of isolated words.

    Paragraph styles can include the character automatically Style: Styles, GREP, nested Styles, initial letters, chips automatic & numbers and line styles.

    Object styles , set the frame of the object. They include separate definitions of all of the object, the stroke and fill.

    Object styles can also be applied to images in a frame and groups.

    Object styles may also include in the following paragraph Style and a style of paragraphs in automatic way.

    Object styles have several categories, you can choose which category is relevant to apply. For example, it is possible to apply the first style object to give the stroke and fill and apply a different object style to format the corners only and then apply the next. (With this method last only the applied object Style is linked).

    Styles of the opportunity to make global changes in a document. If you build in a smart way, they are a huge time saver. They can be stored in the CC libraries or libraries with objects that are applied to them. If you have created once these styles, you can use them again, and with one or two clicks, you can make their own to new document.

    My recommendation: the habit of Styles, name them always with the same names that it helps you to be accustomed to them and to work faster, much faster.

    There are more models: Table Styles, Styles of cell, the Master Pages and color chart.

  • Need to search and apply a character style sheet

    I have a directory with the name and address of the student. I need to find 2 returns and replace with 2 returns, apply the character style, back. Here is a screenshot so you can see what I mean screen.

    [Picture with private information removed by Moderator]

    Allen, Davis must be condensed ital "BOLD" like Ahmed, Ehsan is above. Any help appreciated.

    Post edited by: Peter Spier

    Right. I have the impression that there is. As always... may be wrong.

  • How to use paragraph and character styles properly?

    I have a document in which the text has two colors (which has no style)

    Black (normal) and Red (to highlight the keywords).

    I needed to put these 2 in a style

    (black) paragraph style

    (red) character style

    Here's my question.

    How can I make sure that when I use the paragraph style, she also uses the style of character but only on the Red words?

    While I need not find/replace every word manually

    I want to do at once.

    If you want to add styles to a document already created:

    (1) create your character style that contains only the color of the characters

    (2) search and replace a text with red color search and replace with the new character style formatting. (Do not type anything in the text portion of the find and Replace dialog box)

    (3) create and apply your paragraph style to all. The text with the applied character Style will stay red.

  • Link to paragraph CS5.5 character style?

    I've created a few different character Styles in Indesign for example SM and I want that all the SM Style of character to bind to its abbreviation is 'Site Manager' in the document.

    Is it possible to connect all this throughought Style character of the document to this part of the document, or I have to create each one individually (monotonous)?

    AHA! Now, I understand. You want to add cross-references to all instances of a given character style programmatically. It is no doubt scriptable, but I don't think that there is a native InDesign tool that does this.  I think Kasyan xref script might be useful to to seriously reduce you the number of clicks you have to do to remove this. However, there is no script that will be "find the first instance of charstyle, define as the target of a hyperlink, find the second instance, do xref in the first instance, find the next occurrence, repeat" - at least I know.

  • Select the character style [no]

    Hi all

    Is there a javascript something simple that would choose character style [no]? (no paragraph)

    whenever I open the Indesign document, there is a specific style (when the document has been saved) and it is white in color that won't work for me. So I was wondering a simple script to reset the style [None]

    Thank you

    Hi Dawid,

    Please try the JS code below.

    app.activeDocument.textDefaults.appliedParagraphStyle = app.activeDocument.paragraphStyles.item ("[Basic Paragraph]");
    app.activeDocument.textDefaults.appliedCharacterStyle = app.activeDocument.characterStyles.item ("[None]");
    

    THX,

    csm_phil

  • [FM11] Print the link to the Image and the markers of Index with the specific character Style

    Hello

    I'm new with scripts for Framemaker. I want to export FM docs to RTF, so I can import into InDesign. For placed images I want to insert a line of text that shows the link to the image (reference). In addition, I want to show the Index markers at the insertion location of brand with a different character Style. Can someone help me with this?

    Best regards, Sjoerd

    Sjoerd Hello,

    A note on your method to retrieve all related graphics: this will also deal with graphics that could be linked in master pages and reference. Just to be safe against unwanted side effects, you should limit your list of charts to those in the main flow of your document.

    On the tLoc: looking for really the cornerstone of the anchored frame that contains the chart. It's a little confusing that FM called the anchored frame and any graph of the same name. Even if you add a framework anchored in the text to an equation or a text box in your document, the anchored frame will appear in the list of the chart in the document. If you have a framework anchored containing an imported graphic file, you have a list of graphic objects inside the anchored frame, who himself appears in the list of graphical objects in the document.

    This function should do what you want to do:

    function ListGraphics (doc)

    {

    var had is doc. FirstGraphicInDoc;

    While (had. {ObjectValid()})

    If (aframe.constructor.name == "Eu") {}

    image = had. FirstGraphicInFrame;

    If (graphic.type is Constants.FO_Inset)

    doc. AddText (had. TextLoc, graphic. InsetFile);

    }

    had had =. NextGraphicInDoc;

    }

    }

    I suppose you also want to remove the anchored frames (imported image files) the text. This can be done in the same routine, but you first have to catch the next element in the linked list graphics in the doc before deleting the current. If you do not delete the first and end up with an object not valid. The method simpler and more secure to do is to create an array of items to delete. After the while loop, you delete these objects. Get the complete code looks like this:

    function ListGraphics (doc)

    {

    var toDelete = [];

    var had is doc. FirstGraphicInDoc;

    While (had. {ObjectValid()})

    If (aframe.constructor.name == "Eu") {}

    image = had. FirstGraphicInFrame;

    If (graphic.type == Constants.FO_Inset) {}

    doc. AddText (had. TextLoc, graphic. InsetFile);

    toDelete.push (had);

    }

    }

    had had =. NextGraphicInDoc;

    }

    for (i = 0; i< todelete.length;="" i++="" )="">

    toDelete [i]. Delete();

    }

    }

    This works on a small test file created. If you are in need of more support, do not hesitate to contact me: jang to jang dot nl

Maybe you are looking for