Find and replace for multiple thin space with enter...

Hi,
     Im new to the InDesign Scripting.  I need to replace multiple thin space with enter to single enter.  Dont know how to do.  Pls someone help me.
Thanks in advance,
Sudha

Hi Sudha,
Use the Sample code,
app.findTextPreferences = null;
app.changeTextPreferences = null;
app.findChangeTextOptions.wholeWord = false;
app.findChangeTextOptions.caseSensitive = true;
app.findChangeTextOptions.includeMasterPages = false;
app.findTextPreferences.findWhat = "<2009>^p";
app.documents.item(0).findText();
app.changeTextPreferences.changeTo = "^p";
app.documents.item(0).changeText();
app.findTextPreferences = null;
app.changeTextPreferences = null;
Regards,
Nagaraj

Similar Messages

  • Find and Replace across multiple topics

    I haven't used RoboHTML in a few years and am getting back to using it again. this is a fairly simple question, but the Help for RoboHelp doesn't seem to provide an answer.
      How do you do a simple find and replace across multiple topics?  I want to search for a text string and replace it with another text string.

    Hi,
    Have you tried to use the "Multiple File Find and Replace" option present in RoboHelp. You may access this option from Edit->Find and Replace in Files.
    Before trying to find the files, please ensure that the where field in the dialog points to the correct location of your project.
    Thanks

  • "Find and Replace" for field names in a fillable PDF

    Is it possible to do a "Find and Replace" for the field names in a fillable PDF? For example, I have multiple fields that contain the word "Proposed Insured" as part of the field name and would like to find and replace all of them with "Owner". Is there an easy way to do this?

    Not really. Even a script can't just rename a field. It needs to create a
    new field on top of the old one, but then you lose all the associated
    settings, like validation, calculation, format, keystroke, etc.

  • How do I create a multiple find and replace for Excel in AppleScript?

    I have a large dataset in Excel that I have to do a multiple find/replace in (changing USPS state abbreviations to their full names). In searching the Microsoft boards--I was directed to use Applescript, and even the documented help with Excel was recommeding this. Unfortunately, there wasn't much help potinting me in the specific direction I needed. Any ideas on how I should write this script?
    Thanks!

    I'm confused as to why Applescript (or any script would be helpful).
    You'd have to type the abbreviation and the full name into the script, the same as just using Find and Replace All. You wouldn't gain anything by using a script. Is there more to this task than you've let on?
    MacTech has an article on converting from VBA to Applescript, but I'm not sure if it would have any ideas on your specific problem: http://www.mactech.com/vba-transition-guide/index-toc.html

  • Find and Replace Across Multiple Sites

    Hi,
    Just wondering if anyone knows a way or a piece of software
    that enables you
    to Find and Replace code, text etc across multiple sites?
    I am using DWMX2004 and I can do it on a per site basis but
    not multiple
    sites at once.
    Any idea's???
    Thanks
    Darrell....

    Alan wrote:
    > IF these dreamweaver sites are all in a common folder,
    like
    > sites:siteA and sites:siteB and so on- You could make a
    new dw site that
    > has the common root folder "sites" as it's Local folder.
    Find and Replace
    > sitewide while in that site would effect all the files
    within the defined
    > folder.
    You don't have to define a site, Blue, just select a folder
    to search.
    Mick
    >
    > also, other text editors have good find and replace
    features.
    >
    > back up, back up, and then make another back up copy.
    >
    > If working with links in this "super site" definition-
    be aware of the
    > possible problems of defining a site where the root
    isn't the real root.
    >
    >
    >>Just wondering if anyone knows a way or a piece of
    software that enables you
    >>to Find and Replace code, text etc across multiple
    sites?
    >
    >
    >

  • Find and Replace for XML

    I have requirements for searching through XML files and performing a number of different Find and Replace functions. They include Find and Replace:
    - on content in any element
    - on content within a specified element
    - on attribute values within a specified element
    - on attribute names within a specified element
    - on element type names themselves
    The last 2 Find and Replace types could invalidate the document. I'm thinking DOM would be most appropriate for this. Which java packages/classes/technologies are the best to use? BTW, I've got some experience with java and a little less with XML.
    Thanks....

    Hi, here is what I suggest: You can use DOM or JDOM as your tecnology. I prefer to use DOM because is the one I'm familiar with.
    For the first three assignments, you can use DOM methods to get node text, data, etc.(look for the API/examples in the web). For the 2 last assignments, you may need to use XSLT to produce the OUT put XML and in some cases use filtering and concatenation. See http://java.sun.com/webservices/docs/1.0/tutorial/index.html.
    Good luck!

  • How to use Find and Replace for CR or TAB

    How can I use PAGES 'Find and Replace' function to eliminate unwanted carriage returns or Tabs?
    I tried to copy the backwards P and paste into Pages find window, but that doesn't work.
    eMac   Mac OS X (10.4.4)   1 G RAM

    Copying & pasting should work, but it isn't necessary. In the Find & Replace fields hold down the Option key & hit the return or tab key.
    Peggy

  • Find and Replace across multiple PDF files

    Hello,
    The company I work for has recently changed it's name from (for example!) "Rob's Company" to "Dave's Company".
    I have a folder with several thousand PDF files where "Rob's Company" is mentioned and I want to find/replace this for "Dave's Company" in one job (as opposed to opening each file and doing a find/replace in each one).
    I am happy to purchase a copy of Adobe Acrobat in order to do this, but I'm unsure if it is capable of doing so. I know it is possible to do this for individual files, but not sure that it can do a find/replace for all files in a particular folder.
    I hope someone is able to assist me, I'd be very grateful.
    Best wishes,
    Rob

    I totally agree with you regarding keeping the source files; it's common sense isn't it! I've only worked at this company for 14 days and the vast majority of docs are years old so it would be nearly impossible to trace back the owner of the document internally and then for who their contact is at the client who originally sent it over. With staff turnover you'd probably get nowhere pretty slowly!
    Thanks very much for your redact suggestion. Is that basically where you "stick" new text over the old? The phrases to be changed are reasonably simalar in length (new text is 1 character smaller) so if there was a small gap at the end of the phrase I wouldn't loose sleep over it.
    Thanks again for your help - as I say with just 14 days in the company it would be nice to get this job done without involving too many people so it looks good to my new bosses!
    Rob

  • Find and replace characters in file names

    I need to transfer much of my user folder (home) to a non-mac computer. My problem is that I have become too used to the generous file name allowances on the Mac. Many of my files have characters such as "*" "!" "?" and "|". I know these are problems because they are often wild cards (except the pipe). Is there a way that I can do a find and replace for these characters?
    For example, search for all files with an "*" and replace the "*" in the file name with an "@" or a letter? I don't mind having to use the terminal for this (I suspect it will be easier).
    Is this possible? Does anyone have any suggestions?
    Thank you in advance for any help you may be able to provide.
      Mac OS X (10.4.8)  

    Yep.
    "A Better Finder Rename" is great for batch file renaming.
    http://www.versiontracker.com/dyn/moreinfo/macosx/11366
    Renamer4mac may be all you need.
    Best check out VersionTracker. In fact everybody should have this site bookmarked and visited daily.
    http://www.versiontracker.com/macosx/

  • Find and Replace feature (DW8)

    I have 300+ pages, where every page includes an image, while
    the image could
    be the same in more than one pages.
    How can I find which images are common in which pages?
    Please note, that I wouldn't like to use Find and Replace for
    each one of
    the images, as there are more than 200 of them. I would like
    a more
    "general" expression instead. Something like "Find all the
    pages where *any*
    image file name is in more than one of them". Then, I
    (probably) get a list
    like the one below:
    image1.jpg is included in files 10.htm, 15.htm, 20.htm
    image2.jpg is included in files 30.htm, 40.htm
    image3.jpg is included in files 100.htm, 150.htm, 200.htm,
    300.htm
    ... and so on
    Is there a workaround? A regular expression... an
    extension...?
    TIA
    Please, remove hyphens to contact me

    "Michael Hager" <[email protected]> wrote in message
    news:f3pg21$22q$[email protected]..
    > Use search and replace to just find .jpg in the code for
    entire local
    > site.
    > Then in the results pane click the save icon at the left
    to save the
    > results to a file.
    >
    > It will list every .jpg file in the site, list which
    page it is in and
    > show the line of text it appears in.
    >
    > Repeat the process for .gif, .png or any other file
    types you may have on
    > your site.
    >
    > With a little creative sorting in excel you can find all
    duplicate files
    > as well.
    >
    Creative sortings need productive minds. Don't they? ;-)
    Thanks a lot!

  • Using + and - keys to change dates and times; Find and Replace event

    Hi all, \
    I have two iCal related questions. One has been bugging me since the Snow Leopard upgrade and the other I'm just wondering about.
    1. Is it just me or is it no longer possible to use the + and - keys to increment dates and times when editing an event? It seems that now I have to actually type in the numerals instead. Is there something in the preferences I'm missing or is that just the way it is now? Seems like a step backward, if so.
    2. Is there a way to do a "find and replace" for an event that occurs sporadically throughout the year, but isn't a repeating event per se? I just want to rename the event itself.

    Don,
    ...is it no longer possible to use the + and - keys to increment dates and times when editing an event?
    I did not know that was possible. Try using the ↑/↓ arrow keys to increment numbers, and →/← arrow keys to change fields.
    Is there a way to do a "find and replace" for an event that occurs sporadically throughout the year, but isn't a repeating event per se?
    AFAIK, you have to use the search field to find the individual events, and change them when you click on the events in the search results field.
    ;~)

  • In Edge Code can i do a find and replace?

    In Edge Code can i do a find and replace on multiple lines of code or just a single line?

    You can't do it on just one type of file. However, you can do find and replace in selected files. Ctrl-click to select the targeted files in the Files panel, and then choose Selected Files in Site from the Find In drop-down.

  • Find and Replace with space or tab

    Hi,
    I have a text file that has commas separating values. I saved it as a csv, but am not getting the results I need with the csv file. I'd like to replace the commas with a space or a tab.
    I know how to use find replace, but I do not know how to indicate these non-printing characters. I tried the ascii code &#32 for space, but i simply get that string of characters replacing my commas.
    ANy help?
    Thanks

    KW,
    You didn't say what program you were using for the Find and Replace, but I'd suggest that Pages would be your best bet. Spaces can be typed-in directly, and several other non-printing characters can be inserted from a drop-down menu.
    The Insert drop-down seems to be available only in Pages, as opposed to Numbers and TextEdit.
    Jerry

  • Using applescript for Find and Replace All in Pages 2.0

    i saw that Pages 2.0 is scriptable
    i try to create a script for merge use to find and replace all occurence of a certain string using a script but Pages doesn't seems to respond to "Find" even using "System Events"
    how can i do to use this function with a script
    Thanx for any help
    S.B.
    ibook G3   Mac OS X (10.4.6)  

    OK, here's another example. This one gets the text as a string and uses the offset property to find "[", presuming it to be a merge delimiter. (Pages' text doesn't support "offset of").
    One failing of this scheme is that the offsets are incorrect if you have inline objects (pictures, shapes, tables, etc.). While it is probably possible to compensate for them, that's a trickier proposition.
    <PRE>-- Example merge replacements:
    property mergeText : {"[name]", "John Smith", "[address]", "1234 Anystreet"}
    on lookup(mergeWord)
    set theCount to count of mergeText
    repeat with x from 1 to theCount by 2
    if item x of mergeText = mergeWord then
    return item (x + 1) of mergeText
    end if
    end repeat
    -- If merge field is not found, delete it (replace it with the empty string)
    return ""
    end lookup
    tell application "Pages"
    repeat
    tell body text of document 1
    -- Get text as a string so that "offset of" can be used.
    set allText to it as string
    set startOffset to offset of "[" in allText
    if (startOffset = 0) then
    exit repeat
    end if
    set endOffset to offset of "]" in allText
    select (text from character startOffset to character endOffset)
    end tell
    set mergeWord to contents of selection
    tell me to lookup(mergeWord)
    set replacement to result
    set selection to replacement
    if (replacement is "") then
    -- Get rid of extra whitespace (space or return)
    -- Do it in a "try" block to handle edge cases at start or end of text.
    try
    set theSel to (get selection)
    set ch1 to character before theSel
    set ch2 to character after theSel
    if ((ch1 is " " or ch1 is return) and (ch2 is " " or ch2 is return)) then
    select character after theSel
    delete selection
    end if
    end try
    end if
    end repeat
    end tell</PRE>
    Titanium PowerBook   Mac OS X (10.4.6)  

  • How to use Microsoft Word's Find and Replace with HTML tags?

    Hello to all!
    I'm trying to figure out how to use the find and replace function in Word to replace html tags. I'd like to be able to change something like this:
    <span class="B01-K-ITAL">random text</span>
    To something like this:
    <em>random text</em>
    I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly.
    Anyone able to lend a hand?

    Here is my latest regular expression with Perl.   I think it matches the spirit of the request in the original post.
    Note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.
    perl -0660pe 's^<[sS][pP][aA][nN]\s+class="B01-K-ITAL"\s*>(.*?)</[sS][pP][aA][nN]>^<em>$1</em>^gs' i.html >|o.html
    input text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <span class="B01-K-ITAL">#1 one line</span> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <span class="B01-K-ITAL">#2 don't be greedy</span> <span class="B01-K-ITAL">$3 multiline text</span> <span class="B01-K-ITAL">#4 multiline tag. I believe html allow a carriage return in white space of tags</span> <span class="B01-K-ITAL">#5 split after the class tag. optional white space</span> <sPan class="B01-K-ITAL">#6 mixed case tag</Span> <p>no text #7</p><span class="B01-K-ITAL"></span> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>
    output text
     <html> <head>...</head> <body>I'd like to be able to change something like this: <em>#1 one line</em> I want to replace the open and close tags without changing or interfering with the text between the tags. I'm pretty sure I should use wildcards, but I can't figure out how to use them properly. <p>note, this isn't as easy as you think.  You need to code up the complete set of html rules in you implementation. You need to allow for a certain amount of mal-formed html.</p> <em>#2 don't be greedy</em> <em>$3 multiline text</em> <em>#4 multiline tag. I believe html allow a carriage return in white space of tags</em> <em>#5 split after the class tag. optional white space</em> <em>#6 mixed case tag</em> <p>no text #7</p><em></em> <!-- Apparently, this is valid     http://www.positioniseverything.net/articles/cc-plus.html --> <!--[if IE]> <div id="IEroot"> <![endif]--> <p id="IE">This browser is IE.</p> <p id="notIE">This browser is not IE.</p><!--[if IE]> </div> <![endif]--></body> </html>

Maybe you are looking for

  • When closing a Word doc can you stop 'Do you want to keep this new document?'

    Hi, Everytime I close a Word document I keep getting the save document dialogue box appearing with the text 'Do you want to keep this new document [filename]?You can choose to save your changes, or delete this document immediately. You can't undo thi

  • Why can I not download and print PDF?

    Have tried Chrome and Firefox. Neither will downloador print a PDF file. They both did this morning.  Now won't.  What can I do?

  • Problem in connecting to gmail pop

    Hi when i try to connect to gmail ,i get the follwing exception. javax.mail.MessagingException: Connect failed; nested exception is:      java.io.IOException: Couldn't connect using "javax.net.ssl.SSLSocketFactory" socket factory to host, port: pop.g

  • I pod in I tunes, but cannot access I Pod music

    I can see my ipod and the music on the ipod in itunes, but I cannot listen to, delete, move, add or do anything to the music on the ipod in itunes. I see all the muisc there, but it is all greyed out. I have to create a playlist in itunes and sync.

  • Best Practices for zVM/SLES10/zDB2 environment for dialog instances.

    Hi,  I am a zSeries system programmer who has just completed an IBM led Proof of Concept which demonstrated the viability of running SAP instances on SUSE SLES10 Linux booted in zVM guests and accessing zDB2 data via hipersockets. Before we build a L