Search for the strings "BOLD" and apply XML tags that already, I created manually...

Dear friends,

I want to string (strings that are "BOLD") the search of my document textframe and ask xmltags who... I worked with the codes below... But it doesn't quite work...  (b "BOLD" tag with a color label)

docObj = app.activeDocument;

xmlObj = docObj.xmlTags;

app.findTextPreferences = app.changeTextPreferences = null;

app.findTextPreferences.findWhat = '(.+)';

app.findTextPreferences.fontStyle = "Bold";

app.changeTextPreferences.changeTo = docObj.xmlImportMaps.xmlObj.tags.item(name:b);

docObj.mapXMLTagsToStyles ();

Thank you and best regards,

Vel.

Finally, I got the correct codes after no. attempts, I tried...

Here is the code:

docObj = app.activeDocument;

xmlObj = docObj.xmlTags;

pageObj = docObj.pages.item (0);

myTextFrame = pageObj.textFrames.item (0);

myText = myTextFrame.parentStory.paragraphs.item (0);

app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences.fontStyle = "Bold";

xmlObj = app.changeTextPreferences.markupTag [0] .name;

Alert (App.changeTextPreferences.markupTag);

app.activeDocument.changeText ();

app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences.fontStyle = "Bold Italic";

xmlObj = app.changeTextPreferences.markupTag [1] .name;

Alert (App.changeTextPreferences.markupTag);

app.activeDocument.changeText ();

app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;

app.findTextPreferences.fontStyle = "italic";

xmlObj = app.changeTextPreferences.markupTag [2] .name;

Alert (App.changeTextPreferences.markupTag);

app.activeDocument.changeText ();

app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;

app.findGrepPreferences.capitalization = Capitalization.SMALL_CAPS;

app.changeGrepPreferences.markupTag = xmlObj [4] .name;

Alert (App.changeGrepPreferences.markupTag);

app.activeDocument.changeGrep ();

Thank you

Vel...

Tags: InDesign

Similar Questions

  • title search for the words HTTP and 404. __

    I am unable to get the photo galleries to display on this site that I would use often:http://english.vietnamnet.vn/en/vietnam-in-photos/349/hanoi-s-folk-festivals-in-old-photos.html

    Technical information (for support personnel)

    Hi Gowest,

    • Were you able to see the photos earlier on this site?
    • Are you able to see the pictures on other sites?

    This seems to be a problem with the Web site. Even I tried to access the link and I was unable to see the pictures on this particular link and it shows red x instead of the image and clicking on it gives the same error you posted.

    You can communicate with the support of Web site to check if they have any problems with the images in the link of the Web site.

    I hope this helps.

    Thank you and best regards,

     

    Srinivas R

    Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Search for the string in the string table and see the following value in the line

    Hi, I'm new I have LV and I do a Vi that read worksheet values and generates 2d channels of the same spreadsheet table. For the moment everything I need is a function that find specyfic string in this table and show the next value in a line. As:

    Table:

    a; b
    c; d
    f; g

    example: find the 'c '.

    VI shoud show "d".

    Concerning

    Not a bad homework problem.  Do it with pencil and paper.  Write your table and pretend you're the computer.  What you want to do (step by step)?  What questions do you have?

    Now that the translation a bit to computers.  You mentioned that the data is in an array of strings.  What structures (LabVIEW) work with tables?  [Do you know how to work with tables?  [Otherwise, review some of LabVIEW Tutorial material - see top right of the first page of the Forum].  What do you know about channels?  What questions you need to ask questions on the channels?  What do you know about string functions?

    Watch these things in some LabVIEW code, 'feed' some data and see what he does.  If it seems to do things "unexplained", you can try to look at the block diagram to run by turning the performance highlight (and if you don't know what that means, use the help of LabVIEW and see the tutorials).

    Bob Schor

  • How can I change the registry values with a common search for the string and replace the function where I don't do all manually?

    Due to problems of space with my installation of XP Pro, (operating system has been installed on a 4 GB partition and I did have a copy of the OS to do a new installation) I am trying to move a number of files on a mounted drive.

    It is a way to search an entire record of [SPECIFY FOLDER] "C:\Program Files\" instances and replace each with "C:\Program Files\Overflow\ [SPECIFY FOLDER]" as a common discovery replace function?

    Also, I'll have to move several "Common Files" files in the mounted folder 'Overflow '. The method to make learning one should help me to do both. Manually, it will take most of thousand years that all the files in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components
    the files seem to have a key value have changed.

    I have already uninstalled and reinstalled some programs at the desired location, but many still use the "Common files" folder despite my having already changed the default installation directory path in the registry. Any help would be appreciated.

    Thank you

    NORTH CAROLINA

    One way:

    1. Start Regedit (start-> Run-> 'Regedit')
    2. Select the branch of the registry, or you are interested in changing.
    3. The export of this branch of the registry (file-> export) in a ".reg" file
    4. Use a programming editor (for example, the freeware Notepad ++) and use the "Find and replace" function to make the changes you want.  Save the modified file.
    5. After making the changes, double-click the .reg file to fold changes in your registry.

    As always, keep a backup of your original registry in case things get really bad and know how to do to restore this backup your machine should not be able to start.

    Notepad ++: <> http://notepad-plus-plus.org/ >

    HTH,
    JW

  • GREP to search for the string of quotes

    I have some strange "strings" of quotes that I need to look where there are single quotes and double row with nothing between them. So ' ' ' ' wording here. ' " "" "Here. »

    GREP lets you search a string of quotes that could consist of a number or combination of single and double quotes? The chain would consist of all open citations or nearby, but could be any combination of double and single, beginning or ending with simple or double.

    Thank you

    Ken

    SRiegel wrote:

    ['"]+

    (it's a single and double quotes inside the square brackets) If you do this with typographical quotes turned on [..]

    As for the finding , there is no need to toggle the quotes or disable. For example, a single ' will find all three variants, while ~ [will match only open loop, ~] closed curly, and ~' those just right.

    Other than that, Yes, you want to make sure that even when curly quote is active for replacements.

  • Search for a word in "()" and apply CharacterStyle

    Sorry my bad English

    I need your help

    I can search in a parenthesis with------((.*)------)

    ex: Hello Goodbye (World), must apply to a CharacterStyle '(World)' with CharacterStyle


    hello (world) bye

    similar script:

    
    var active_doc = app.activeDocument;  
      
    var search_string = /\((.*)\)/ig;
    
    
      
    var text_frames = active_doc.textFrames;  
    
    
    var italicStyle = active_doc.characterStyles["italica"];  
    
    
    if (text_frames.length > 0)  
    {  
        for (var i = 0 ; i < text_frames.length; i++)  
          {  
              var this_text_frame = text_frames[i];  
       
      italicStyle.applyTo(this_text_frame.textRange);  
    
    
                 
               if (new_string != this_text_frame.contents)  
                   {  
                        this_text_frame.contents = new_string;  
                   }  
          }  
    }  
    
    
    
    
    
    

    Thanks, sorry my bad English I speak Spanish

    var frames = app.activeDocument.textFrames;
    for (var j = 0; j < frames.length; j++){
    var text = frames[j].textRange;
    var italicStyle = app.activeDocument.characterStyles["italica"];
    var haystack = text.contents;
    var needle = /[\(]([^\)]*)[\)]/gi;
    var match;
    while(match = needle.exec(haystack)){
    var start = needle.lastIndex - match[0].length;
    var end = match[0].length;
    for (var i = 0; i< end; i++){
    italicStyle.applyTo(text.characters[i + start]);
    }
    }
    }
    
  • BY SPECIFYING THE NUMBER OF IDENTICAL CHARACTERS WHEN SEARCHING FOR A STRING

    Hey everybody,

    built-in indexOf() finds a character "." in the string "1.2.3." If value == 1.

    It looks nothing if the value == 0 or 2 or a number greater than 2.

    var txt:String = '1.2.3.';

    var: output string = String (this);


    If (txt.indexOf(".") == 1)

    {

    trace (output);     [object MainTimeline]

    }

    The must be a simple method to specify the number of characters "." When you search for the string "1.2.3.".

    For example, if there are 2 characters "." in the string "1.2.", then run it through a statement but if contains no 2 characters "." then do nothing.

    There is a built-in function called contains , but it is mainly used in XML.

    indexOf() resembles codes javascript unstable, one of these framework which unixers hatred.

    You don't have to use regular expressions to determine how many points is in the string. Use of split and read the length:

    var txt:String = '1.2.3.';

    trace (txt. Split("."). (length);

  • "Can not open AsIO.sys (2)" I get this message when I log in after a reboot. I have search for the file, but can't find it with the research or the command prompt. What do do in this file, and can be created and put into the appropriate folder?

    "Can not open AsIO.sys (2)" I get this message when I log in after a reboot.  I have search for the file, but can't find it with the research or the command prompt.  What do do in this file, and can be created and put into the appropriate folder?

    Hi Jack,

    This driver belongs to AsIO.sys Asus Probe. Try to uninstall Asus Probe and if you need, install again. If this does not help, uninstall Asus Probe and other tools of control such as Speedfan. Open the registry (regedit.exe) editor and search for AsIO.sys and remove all the entries that you can find.

    André
    "A programmer is just a tool that converts the caffeine in code" Deputy CLIP - http://www.winvistaside.de/

  • Under XP I could search for a string in all the files on my computer. I can't find this search function of SMEs on Windows 7. Anyone?

    On Windows XP, there is a search function to search for a string in any kind of files on your computer. You are looking for a specific name was easy, if you fogort what kind of file, this name occurred in or what it was named.

    On Windows 7 it only allows searching for a name of a file.  How to search for strings in file names?  29/12/12 Paul Figueroa

    Oh, what you want is the content property.

    content: ~ = Figueroa

    [Update: apparently special search symbols such as ~ = do not work with the content when property indexed research places, but work during the search in unindexed locations.]

    I should mention that Windows 7 Search is not case sensitive, so it makes no difference to try to find upper or lower case letters.  In addition, Windows 7 Search is not able to search the contents of files that have no file extension.  There is also a weird question having to watch in Indexing Options to determine which file extensions are defined for content, research, where you have a type of unusual file that is not defined for the content of the search.

  • Is it possible to get a word tend to fade and then fade out and then replace it with another word that fades in and then and so on without a person having to scroll to the bottom of the page. I searched for widgets, but I have not found one that does this

    Is it possible to get a word tend to fade and then fade out and then replace it with another word that fades in and then and so on without a person having to scroll to the bottom of the page. I searched for widgets, but I have not found one that does this impeccable for a subtitle.

    You will need to do something like it in a program like Edge animate.

  • Sizes of Splash screen and names for the iPhone 6 and 6 more in the file descriptor xml files

    Is anyone know the sizes of screen and the file names for the iPhone 6 and 6 more (for the descriptor xml file)? Or current splash screens works on both devices?

    i.e. Default-Portrait.png *-768w x 1024 h

    Hello

    Here is the specification.

    iPhone 6

    Start screen

    750 x 1334

    72

    [email protected]

    Resources or resources/iphone

    iPhone 6 more landscape

    Start screen

    2208 x 1242

    72

    [email protected]

    Resources or resources/iphone

    iPhone 6 Plus portrait

    Start screen

    1242 x 2208

    72

    [email protected]

    Resources or resources/iphone

    You can find more info here - http://docs.appcelerator.com/titanium/3.0/#! / guide/Icons_and_Splash_Screens-section-290048 97_IconsandSplashScreens-Splashscreens

  • my c drive shows low disk space, so I searched for the program that holds more memory on drive c. I got to know that this pagefile.sys has 3 GB in the c drive

    Hi, my c drive shows low disk space, so I searched for the program that holds more memory on the c drive. I came to know that pagefile.sys has 3 GB in the c drive, kindly guide me to move the pagefile.sys to another drive.

    Hi jafrin.michel,

    Thanks for posting in the Microsoft community.

    Before you start the troubleshooting steps, I need the information required.

    What version of the windows operating system do you use?

    Method 1:

    If you are using windows 7, I suggest to perform a disk cleanup and verify.

    Delete files using disk cleanup

    http://Windows.Microsoft.com/en-us/Windows7/delete-files-using-disk-cleanup

    Method 2:

    If you want to move the pagefile.sys to another drive, follow the steps and check out them.

    Follow these steps to move the pagefile.sys to C: drive on D: drive (if you have the drive D :).

    1, write click on my computer and select Properties.

    2, click on the Advanced tab.

    3, click settings under performance menu.

    4, click on the Advanced tab and click on change.

    5, select letter (C :) and "BOLD" No pagefile then click on Set. )

    6, if you want to configure pagefile.sys in, select drive D: drive letter D: and "BOLD" in the custom size or the size of the system managed , then click on Set. It displays a pop-up message click OK.

    7, again click apply and OK OK.

    8, the system you will be asked to reboot, click on Yes.

    9, after rebooting the system, you can see the pagefile.sys will be moved to D:

  • Please, give me an advise how to search for a number in a file xml (as3.0)

    Hello! Sorry for the troubling.

    Please, give me an advice how to search for a number in a file xml (as3.0)

    Thank you!

    My answer was based on your question to find numbers anywhere in the data to an xml file.  If you know that the data is digital data and the names of the nodes that contains this data, you do not have to check the characters and can only check numerical data using string values...

    function searchXMLFile(Event:MouseEvent):void
    {
    searchDisplay.text = "";
    var pageList:XMLList = xmlFileToSearch.receipt.number;
    searchDisplay.text = "false";
       
    for (var i: int = 0; i< pagelist.length();="">
    {

    If (pageList [i] == searchInput.text) {}
    searchDisplay.text = "true";
    }

    }
    }

    Even if you are looking for individual digital characters in the previous code that you would have always done by a false exit due having the line 'false' always cancel the real line...

    If (t.toString () .indexOf (m_sSearchTerm)! = - 1).

    {

    searchDisplay.text = "true";

    }

    searchDisplay.text = "false";  This will always overwrite the textfield

  • Search for the text value data store

    Hello, I have a PDO of data to store, and I would like to search for a text value in a quantity of measure.  In each of my test series, there is a quantity of measure with the name TCNAME and stores the cell name of test in the string format.  I would like to get all the TCNAMEs that contain "TC4" for example.  Currently, I have to load TCNAME in the portal and display it in an array of string.

    Any ideas how I can do this?

    I assume you are using a PUMA testbed that stores this kind of goods on a unique value chain chains.

    There is no direct search method, so I guess that a script is the only solution we can offer.

    Datafinder you can search for the minimum and maximum of a channel. That would be too much work in the store of ASAM.

    "PDO / cpp"
    protected tcnameMQs: set tcnameMQs = store. GetElementList ("MeasurementQuantity", "name = TCNAME", true)
    protected tcnameMQ: for each tcnameMQ in tcnameMQs
    MsgBox tcnameMq.References ("local_columns"). Elements (1). Properties ("values"). Value
    Next

    ' AOP5 / Corba
    protected tcnameLCs: set tcnameLCs = store. GetElementList ("LocalColumn", "measurement_quantity.name = TCNAME", true)
    protected tcnameLC: for each tcnameLC in tcnameLCs
    MsgBox tcnameLC.Properties ("values"). Value
    Next

    I have added the example which should be the shortest path from my point of view. In AOP5, you can search LocalColumn and spend BA which is less overhead.

    It is perhaps a good idea to post-processing of the data base and crush the decription "Test name" by

    "The test cell name == NAME. You can search not post-processed by Searchin' for.

    protected tcnameMQs: set tcnameMQs = store. GetElementList ("MeasurementQuantity", "description = name of the test cell", true)
    protected tcnameMQ: for each tcnameMQ in tcnameMQs
    tcnameMQ.Properties ("description"). Value = "name of the test cell is" & tcnameMq.References ("local_columns"). Elements (1). Properties ("values"). Value
    Next
    Store.Save

    Thereafter, you would be able to search for it.

    Greetings

    Andreas

  • Search for the last occurrence of a substring

    How to search for the last occurrence of a substring in a string? In more detail: I have the array with the names of files, and I want to split the file name extension in a separate column. The name extension doesn't have a fixed rate with (can be 'c', "" jpg"or"mpeg", etc.), and names of files themselves can contain points (if this is possible:"recording.of.last.meeting.mpeg".)

    So the only way to extract the name extension is to look for the last appearance of a dowry and split on everything after the last point. How can I do this? I worked with a sybase database before and there was a string function to search for the right of the string. Is there something similar in Oracle?

    If you're on 10g, you can

    with t
    as
    (
    select 'recording.of.last.meeting.mpeg' file_name from dual
    )
    select regexp_replace(file_name,'^.+\.') fiel_extension
      from t
    

Maybe you are looking for