[CS3 AS] set paragraph style, go to next paragraph, set paragraph style, etc.

hello,
i'm pretty much a noob at scripting. i'd like to automate applying paragraph styles to a document with reviews.
basically, i want to place the cursor in a paragraph (manually), and have a script do the following: set paragraph style 5, go to the next paragraph, set paragraph style 1, go to the next paragraph, set paragraph style 2, go to the next paragraph, set paragraph style 3.
help?
(i specified AS as i think i might understand it, but JS probably works as well)

Assuming you set the relationship of one style to the next using the 'Next Style' definition in the paragraph styles, then the following should do the trick (assuming you have your cursor in the first paragraph).
> // Follows next paragraph style setting until Same Style or No Paragraph Style
>// Get the current pagaraph based on user cursor location
var myCurrentParagraph = app.documents[0].selection[0].paragraphs[0];
do
] // Currently applied paragraph style
var myCurrentParagraphStyle = myCurrentParagraph.appliedParagraphStyle;
] // Next Style for current paragraph style
var myNextParagraphStyle = myCurrentParagraph.appliedParagraphStyle.nextStyle;
] // Check current style and next style are not the same or No Paragraph Style
if (myCurrentParagraphStyle == myNextParagraphStyle
|| myNextParagraphStyle == app.documents[0].paragraphStyles.item("[No Paragraph Style]") ) {
]] exit(); }
] // Get next paragraph in chain
var myNextParagraph = myCurrentParagraph.insertionPoints[-1].paragraphs[0];
] // If we are end of story then stop
if (myNextParagraph == myCurrentParagraph) { exit(); }
] // Apply next style to next paragraph
myNextParagraph.appliedParagraphStyle = myNextParagraphStyle;
] // Restart the process
myCurrentParagraph = myNextParagraph;
>while (true)
Note that the process will end when the Next Style setting of one paragraphs is Same Style or when the Next Style is No Paragraph Style. There would be other ways to end the process, such as limiting it to a certain number of steps if the number of steps was always the same. Let me know.

Similar Messages

  • Clipboard Preference: All information (Index Markers, Swatches, Styles, etc.)

    Where I work we paste text often from PDFs into InDesign. For the longest time, since CS2, we have had our InDesign's Paste Preferences set to "Text Only" instead of "All information (Index Markers, Swatches, Styles, etc.)"
    I am not sure why, but I think it was based on the fear of the unknown. Has anybody experiences any pitfalls with having "All information (Index Markers, Swatches, Styles, etc.)" checked?
    I notice it carries over RGB swatches, which is rather annoying because we don't want them. And this is what I don't understand…
    If I create an InDesign document and assign some copy a CMYK swatch, then export the PDF to X1-a, then open the PDF in Reader and paste this text into the same InDesign document, I will get a new RGB swatch that when switched/changed to CMYK has different C,M,Y,K values than the original CMYK swatch that I began with.
    Is there any way to retain the same swatch values through this process?

    You will notice that in the Text Properties for text selected in Acrobat it does not have a CMYK colour picker. It only has a RGB colour picker.
    That's why when you select text it copies it as RGB and not CMYK.
    The RGB is only for displaying onscreen, rest assure it does in fact keep the CMYK data safe, regardless of whether you include the profile or not in the PDF.
    It removes any swatches, any styles and anything else to make a basic "portable document format". Acrobat has no colour pallete for CMYK. So when you select the CMYK text in Acrobat, then Acrobat colour pallete itself converts those values to RGB. If you understand what I'm saying. So the CMYK data is still there, only Acrobat has no way for you to select that colour so it converts it to RGB in the Colour Pallete only.
    I'm not sure if I explained that very well?
    I usually leave on the option to retain all swatches, styles, etc. because I don't like having to apply bold, italic, swatch colours etc. to text. Hyperlinks come in as character styles and can be easily changed.
    I've not had any problems with it. There are times I do need to turn the option off - but that's why it's there, it's a preference, a choice, an option.

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • TS4006 How do I add iphone4s to iCloud's "find my phone"? I turned on macbook pros system prefs to "find my phone", turned on iphone4s's "location services" and set up iCloud, etc. iPhone4s still won't show-but macbook does show. It receives gmail, weathe

    How do I add my new iPhone4s to iCloud's "Find my iPhone"? I followed the iCloud instructions and turned on Macbook Pros' system prefs to "find my mac", turned on iPhone4s's "location services" and set up iCloud, etc. In the "Find my iphone" tab of my new iCloud account (on my Macbook Pro) my iPhone4s still won't show—but my macbook does show. I had my iPhone4s set up at the phone store (2 days ago) and It receives gmail, my contacts and calender entries, the weather, etc. I installed the "Find iPhone" app from iTunes on the iPhone4s, synched to iTunes, even reset the phone, but the only device that gets located is my Macbook Pro. I can send a "sound" message to my Mac (and the Mac recieves it) but unable to see the iPhone4s from my Mac, let alone send any message. Any suggestions to get the iPhone4s device to appear in iCloud?
    Thank you in advance for your help.

    OK, I figured it out...I deleted the iCloud account off my iPhone (Settings, iCloud, Delete Account), and then added iCloud back in (Settings, iCloud, SignIn)....and then my email (iCloud) and "Find my phone" features worked! Nice!!!!

  • I am trying to set up my new replacement phone and the iCloud account is using my old email that is no longer activated, so I am not able to reset my password in order to set up messaging, etc. What do I do??

    I am trying to set up my new replacement phone and the iCloud account is using my old email that is no longer activated, so I am not able to reset my password in order to set up messaging, etc. What do I do??

    Try to change your Apple ID back to your old email address (http://appleid.apple.com) in order to set up and activate the phone. After the set up please sign out of iCloud and turn off "Find My iPhone" (Settings > iCloud) - do that on all your devices -, then change your Apple ID to your new address again and then add your iCloud account on you devices again.

  • When viewing multiple item information, I was wondering what the checkboxes next to "Artist", "Album Artist", etc... are used for.

    When viewing multiple item information, I was wondering what the checkboxes next to "Artist", "Album Artist", etc... are used for.

    When checked, it means that you are going to apply whatever is in the box to all of the selected items.

  • I've imported some midi tracks, used the mixer to set pan, volume etc, but when I stop playback and restart it sets every midi track back to '0'. I've been using LE for years, this is a new one, any ideas?

    I've imported some midi tracks, used the mixer to set pan, volume etc, but when I stop playback and restart it sets every midi track back to '0'. I've been using LE for years, this is a new one, any ideas?

    Hi,
    that's because Logic reads the volume information out of the imported MIDI tracks and sets the volume fader according to this information. The MIDI information overrides volume settings you have done, so you have to identify the MIDI events that contain volume (or expression or pan or whatever) information and delete them. You can use the event list editor for this.
    Fox

  • I had a Verizon tech set my ports etc however like others we keep getting Error 0X800CCC7D

    I had a Verizon tech set my ports etc however like others we keep getting Error 0X800CCC7D. I called Verizon Support and they doubled checked my settings, that they set up, and we still Error 0X800CCC7D after 5 or 6 emails.
    I went to Microsoft's Forums and they pretty much say the same thing about Error 0X800CCC7D and that the only thing left that can be wrong is the ISP has some thing wrong, there are NO more options for the clients to do.
    Verizon told us they are doing away with the Yahoo accounts and connections and now have their own email program that I have accessed. However before this we did not get Error 0X800CCC7D.

    I am not sure how to make a image of my settings, I wrote them down as the Tech changed them.
    We took out Yahoo in both our incoming and outgoing entries so they read
    incoming.verizon.net
    outgoing.verizon.net
    The ports are now 995 and 465, below I have posted what I watched the Tech change to. We can test our email Accounts with Outlook 2003 and they will send and receive immediately in the test.
    However when we actually go to send something nearly every first time or two the sending hangs up for 5 minutes. Then we get the error message 0x800ccc7d.
    I have been minimizing the sending box and going on with business and eventually it sends the email, email size does not matter, then it is followed with the error message 0x800ccc7d. Microsoft's forum believes the server is not set correctly for smpt accounts with SSL security settings. That is why I contacted Verizon, who have been helpful and checked out their own settings, however neither of us has pin pointed the issue or solution.
    Mail server settings
    Incoming mail server (POP3): pop.verizon.net
    IncomingServerPort Numbers: 995
    Outgoing mail server (SMTP): smtp.verizon.net
    Outgoing ServerPort Numbers: 465  
    Your Verizon Online user name
    Your Verizon Online password
    Make sure "This server requires a secure connection (SSL)" is checked.

  • InDesign CS3 crashing adding table style...HELP!!

    This issue started on Friday.  I just starting working on a large document that will have many tables throughout, so I must use the table styles.  Here is the order in which I do things to get the crash.
    Place document from Word in to InDesign document
    Highlight table to be changed
    Convert text using paragraph styles
    Alter column widths to fit page
    Highlight entire table to select table style
    Click desired table style
    CRASH!!!!
    I have tried the following things with NO LUCK:
    Deleted adobefntX file multiple times (actually worked for a couple of hours first time I did it)
    Deleted InDesign preferences (did nothing)
    Re-created all "Styles" in InDesign (Character, Paragraph, Cell, & Table) (Did nothing)
    Changed the order in which I altered the tables text and formatting (thinking it was just a silly order problem)
    Unistalled and Re-installed CS3 (worked for 5 tables and then CRASH)
    Updated ALL software (Adobe and Mac)
    Started up in Safe mode and CRASH!!!
    I realize from seraching for this problem on the web that I am probably the ONLY person having this issue, but I thought it was a font problem until I started in Safe Mode and still crashed.  I am totally confused as to what I should do next.  I am running on a
    Model Name:    MacBook Pro
    Model Identifier:    MacBookPro4,1
    Processor Name:    Intel Core 2 Duo
    Processor Speed:    2.4 GHz
    Number Of Processors:    1
    Total Number Of Cores:    2
    L2 Cache:    3 MB
    Memory:    4 GB
    Bus Speed:    800 MHz
    Boot ROM Version:    MBP41.00C1.B03
    SMC Version (system):    1.27f1
    Any help would be GREATLY appreciated.

    I am not familiar with InDesign Interchange, do you think this will help?
    That's why I suggested it. But you didn't answer my question: Is this happening with only one file? The reason I ask is because if one file is corrupted, saving to INX and back to INDD often clears out minor corruptions. If you're seeing this in many files it's unlikely they're all corrupt.
    1. Convert text using paragraph styles - I meant modified "placed" text using character styles
    Now I'm really confused. Your steps are:
    Place document from Word in to InDesign document
    Highlight table to be changed
    Modify placed text using character styles
    Are you really highlighting an entire table and applying a character style? While this will work to modify certain formatting aspects, it's not really the best approach. Character styles are for characters *within* a paragraph. Paragraph styles are for *entire* paragraphs. Each table cell contains at least one full paragraph, even if it's just a single number, a space, even if there's nothing there at all. If you want to format the contents of an entire cell or range of cells with the same formatting, use a paragraph style, not a character style. If you want to italicize one or two words in some text in a cell (the way I just did), then use a character style.
    I really feel that the issue either stems from fonts or from placing the document from Word.
    Could be. Cheap fonts are the cause of many problems in Indesign. Indesign is really picky about fonts. But let's try the easy fix first (INX). If you don't trust it, save the .inx to a new .indd filename (keep your old .indd file as a backup).
    Ken

  • [JS][CS3] Break Link to Style

    Hello everyone.
    A while back ago I wrote a script to Brake Links to Paragraph Styles and Character Styles. That was easy since you can set to false the option "Clearing Overrides" when applying "No Paragraph Style" [0] or "None" [0]. But I cannot do such a thing with objectStyles "None" [0] even when setting the options to False. Every time the TextFrames get the ObjectStyle "None". And the GUI Palette is not showing a "+" as being modified.
    It does work when using "Break Link to Style" in the GUI.
    Any help would be appreciated...
    Alex.

    CTC Imaging wrote:
    Yes I did think of that solution, but I am trying to keep it clean. Especially if you are doing several document input as copy and pasting into a single document. Since I am trying to doing this automaticaly (The script is assigned to the COPY command through eventListener), if I choose ONE generic name to rename to, I will run into the same issue. Of course I could scan the DESTINATION document for that GENERIC names and add a prefix (counter) to the one I am going to rename in the ORIGINAL document. But It would not work if the DESTINATION document is not open YET! And I can't do it as PASTE because I have to copy with the correct naming FIRST.
    So the best option is to break the link. So how can I emulate "Break Link to Style" in the ObjectStyles menu from the GUI???
    Alex.
    Then you should add Date&Time at the end of name of current Char/Para/Object/Cell/TableStyle
    "MyHeaderStyle" -> "MyHeaderStyle(2010-01-04 16:12:35)"
    I don't think that you can do this TWICE in the same second in two different documents I've done something like that in one of my script and I've added 2 second extra loop to be sure that "random" name can't be duplicated
    robin
    www.adobescripts.co.uk

  • InDesign CS3 crashes when applying styles to pasted text with formatting.

    Running InDesign CS3, v. 5.0.2 on Windows XP, SP2
    InDesign is crashing whenever I do the following:
    1. Paste or place text from Microsoft Word -- with existing formatting preserved.
    2. Apply any character or paragraph style to that text.
    This happens 100% of the time when I try to recreate the error. It happens on more than one computer. It never used to happen in IDCS2. It's not a missing font issue.
    I've tried recreating the InDesign preference files, but it didn't work. (See help file at http://kb.adobe.com/selfservice/viewContent.do?externalId=kb400616&sliceId=1)
    Any suggestions would be hugely appreciated! This is slowing down my work a ton, and manually adding things like underline is killing me. If it persists, I'll have to roll back to CS2. :(

    We had exactly the same issue - but it only seemed to happen when a "Hyperlink" character style came in with the pasted text. In fact, the crash only happened when we tried to apply a paragraph style to a paragraph that had a hyperlink in it.
    Our solution: before we try to do anything else, we delete the "Hyperlink" character style. I can't guarantee that this will solve your issue, but it has worked for us (so far!) in those rare cases when we cut & paste Word text.
    We have never had this issue when we import ("Place") the Word file - that's generally a better workflow anyway.
    -Bill

  • JS CS3 script form word styles to indesign styles

    I have search over the forums and can find a script the can change WORD styles (with a diskette sign) to Indesign paragraph styles (without the sign). Can any one help me on this?
    Thanks.

    Here I translated the script from Russian into English for you. BTW, it is based on a script written by Dave Saunders (thanks Dave for it) — I totally reworked it to my needs. You should replace paragraph style names, font names, find-search strings, etc. with your own stuff.
    Kasyan
    // Description: Script for InDesign CS3
    // Version 4
    // Removes local formatting of the text after importing it from Word transforming it into characters styles
    // Removes non CMYK colors
    // Removes imported styles
    // Adds non-breaking space before some abbreviations in text. For example: В, У, гг., млрд.
    // Removes superfluous. Finds-replaces some sequences of characters:  For example:"--" to "—"
    // Removes hyperlinks
    // Copyright © 2008 Kasyan Servetsky
    #target indesign
    if (app.documents.length == 0) {
         alert("Open a document and try again.", "Error", true);
    else {
         app.activate();
         var myDoc = app.activeDocument;
         if (myDoc.selection.length == 1) {
              if (myDoc.selection[0].constructor.name ==  "TextFrame") {
              var myTextFrame = myDoc.selection[0];
              else {
                   alert("Select a TEXT BOX.", "Error", true);
                   exit();
         else {
              alert("Select a single text block.", "Error", true);
              exit();
         if (!myDoc.saved) {
              alert("This document has never been saved. Save it and try again.", "Error", true);
              exit();
    //--------------------------------- Progressbar ---------------------------------
         var stop = 11;
         var w = new Window ( 'window', 'Preparing the file', undefined, {closeButton:false, maximizeButton:false, minimizeButton:false} );
         var pb = w.add ('progressbar', [0, 0, 350, 20], 0, stop);
         var txt = w.add('statictext', undefined, 'Starting the process');
         txt.alignment = "fill";
         w.show();
         pb.value = 1;
         var myTxtReplace;
         var myGrpReplace;
         myReplaceStuff();
         txt.text = "Finding-replacing text";
         myProblems = 0;
         myReplaceNonCMYK();
         pb.value = 2;
         txt.text = "Removing non CMYK colors";
         if (app.activeDocument.paragraphStyles.item("Body Text") == null) {
              pb.value = 3;
              txt.text = "Creating paragraph style \"Body Text\"";
              var paraStyle = myDoc.paragraphStyles.add( {     basedOn:"[No Paragraph Style]",
                                                                                                        name:"Body Text",
                                                                                                        alignToBaseline:true,
                                                                                                        firstLineIndent:2,
                                                                                                        leftIndent:0,
                                                                                                        rightIndent:0,
                                                                                                        spaceBefore:0,
                                                                                                        spaceAfter:0,
                                                                                                        justification:Justification.LEFT_JUSTIFIED,
                                                                                                        appliedFont:"TimesPalKasN\tRegular",
                                                                                                        pointSize:8.5,
                                                                                                        leading:10.6,
                                                                                                        kerningMethod:"Metrics",
                                                                                                        tracking:0,
                                                                                                        hyphenateCapitalizedWords:true,
                                                                                                        hyphenation:true,
                                                                                                        hyphenateBeforeLast:2,
                                                                                                        hyphenateAfterFirst:2,
                                                                                                        hyphenateWordsLongerThan:5,
                                                                                                        hyphenateLadderLimit:3,
                                                                                                        hyphenationZone:12.7,
                                                                                                        hyphenWeight:5,
                                                                                                        appliedLanguage:"Russian",
                                                                                                        fillColor:"Black"} );
         else {
              var paraStyle = myDoc.paragraphStyles.item("Body Text");
              pb.value = 3;
         removeImportedStyles();
         pb.value = 4;
         txt.text = "Removing imported styles";
         protectLocalStyling();
         pb.value = 5;
         txt.text = "Saving local formatting";
         myTextFrame.parentStory.texts.everyItem().paragraphs.everyItem().applyParagraphStyle(paraStyle, true);
         pb.value = 6;
         txt.text = "Applying paragraph style \"Body Text\"";
         removeInTables();
         pb.value = 7;
         txt.text = "Processing tables";
         myTextFrame.parentStory.texts.everyItem().paragraphs.everyItem().clearOverrides(OverrideType.all); // ***
         pb.value = 8;
         txt.text = "Removing local formatting";
         replaceTxt();
         pb.value = 9;
         txt.text = "Replacing text";
         replaceGrep();
         pb.value = 10;
         myRemoveHyperLinks();
         pb.value = 11;
         txt.text = "Removing hyperlinks";
         w.hide();
         if (myProblems == 0) {
              alert ("No problems were found.", "All done");
         else {
              alert ("Problems were found and corrected.", "All done");
    //************************************** Functions *******************************************************
    function protectLocalStyling() {
        var myStyles = ["Italic","Bold", "Bold Italic"];
        var myPosns = ["superscript","subscript"];
        var myPosnEnums = [Position.superscript, Position.subscript];
         var noCharStyle = myDoc.characterStyles[0];
        for (var j = myStyles.length - 1; j >= 0; j--) {
          var myCharStyle = myDoc.characterStyles.item(myStyles[j]);
          if (myCharStyle == null) {
            var myCharStyle = myDoc.characterStyles.add({name:myStyles[j], fontStyle:myStyles[j]});
              app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences.appliedCharacterStyle = noCharStyle;
              app.findTextPreferences.fontStyle = myStyles[j];
              app.changeTextPreferences.appliedCharacterStyle = myStyles[j];
              myTextFrame.parentStory.changeText();
        for (var j = myPosns.length - 1; j >= 0; j--) {
          var myPosCharStyle = myDoc.characterStyles.item(myPosns[j]);
          if (myPosCharStyle == null) {
            var myPosCharStyle = myDoc.characterStyles.add({name:myPosns[j], position:myPosnEnums[j]});
              app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
              app.findTextPreferences.appliedCharacterStyle = noCharStyle;
              app.findTextPreferences.position = Position[myPosns[j]];
              app.changeTextPreferences.appliedCharacterStyle = myPosns[j];
              myTextFrame.parentStory.changeText();
         app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    //  Removing non CMYK colors
    function myReplaceNonCMYK(){
         for(var myCounter = myDoc.colors.length; myCounter > 0; myCounter--){
              if (myDoc.colors[myCounter-1].name != "Registration" && myDoc.colors[myCounter-1].name != "Paper" && myDoc.colors[myCounter-1].name != "Cyan" && myDoc.colors[myCounter-1].name != "Magenta" && myDoc.colors[myCounter-1].name != "Yellow" && myDoc.colors[myCounter-1].name != "Black") {
                   if ((myDoc.colors[myCounter-1].space != ColorSpace.cmyk)  || (myDoc.colors[myCounter-1].model != ColorModel.process)){
                        myProblems = myProblems + 1;
                        myDoc.colors[myCounter-1].remove ("Black")
    // Removing imported styles
    function removeImportedStyles(){
         var paraStyle = myDoc.paragraphStyles.item("Body Text");
         var noneCharaStyle = myDoc.characterStyles.item("[None]");
         for(var myCounter = myDoc.paragraphStyles.length-1; myCounter >= 2; myCounter--){
              if (myDoc.paragraphStyles[myCounter].imported == true ) {
                   myDoc.paragraphStyles[myCounter].remove(paraStyle);
         for(var myCounter = myDoc.characterStyles.length-1; myCounter >= 2; myCounter--){
              if (myDoc.characterStyles[myCounter].imported == true) {
                   myDoc.characterStyles[myCounter].remove(noneCharaStyle);
    // Processing tables
    function removeInTables(){
         if (myTextFrame.parentStory.texts.everyItem().tables.length > 0) {
              if (myDoc.paragraphStyles.item("05. TABL_BODY") == null) {
                   myTableStyle = myDoc.paragraphStyles.add({name:"05. TABL_BODY", appliedFont:"HeliosKas\tCondensed Regular", pointSize:8, leading:8});
              else {myTableStyle = myDoc.paragraphStyles.item("05. TABL_BODY")}
         myTextFrame.parentStory.texts.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().applyParagraphStyle(myTableStyle, true);
         myTextFrame.parentStory.texts.everyItem().tables.everyItem().cells.everyItem().paragraphs.everyItem().clearOverrides(OverrideType.all);
    // Find-replace pairs
    function myReplaceStuff() {
         myTxtReplace =     [ // TEXT
                                            [" А ", " А^S"],
                                            [" В ", " В^S"],
                                            [" С ", " С^S"],
                                            [" К ", " К^S"],
                                            [" О ", " О^S"],
                                            [" У ", " У^S"],
                                            [" На ", " На^S"],
                                            [" По ", " По^S"],
                                            [" Из ", " Из^S"],
                                            ["г-н ", "г-н^S"],
                                            ["г-на ", "г-на^S"],
                                            ["г-ну ", "г-ну^S"],
                                            [" т", " ^Sт"],
                                            [" г.", " ^Sг."],
                                            [" гг.", " ^Sгг."],
                                            [" грн.", " ^Sгрн."],
                                            [" коп.", " ^Sкоп."],
                                            [" тыс", " ^Sтыс"],
                                            [" млн", " ^Sмлн"],
                                            [" млрд", " ^Sмлрд"],
                                            [" т.п.", " ^Sт.п."],
                                            [" т.д.", " ^Sт.д."],
                                            [" др.", " ^Sдр."],
                                            [" км", " ^Sкм"],
                                            ["см. стр.", "см.^Sстр."],
                                            [" ^p", "^p"],
                                            [" —", "^S—"],
                                            [" —", "^S—"],
                                            ["№ ", "№"],
                                            ["$ ", "$"],
                                            ["EUR ", "EUR"],
         myGrpReplace =     [ // GREP
                                            ["[~m~>~f~|~S~s~<~/~.~3~4~% ]{2,}", " "], // Multiple Space to Single Space
                                            ["--", "~_"] // Dash Dash to Em-dash
                                            // ["~b~b+", "\\r"], Multiple Return to Single Return
    function replaceTxt() {
         app.findTextPreferences = NothingEnum.nothing;
         app.changeTextPreferences = NothingEnum.nothing;
         app.findChangeTextOptions.wholeWord = false;
         app.findChangeTextOptions.caseSensitive = true;
         app.findChangeTextOptions.includeMasterPages = false;
         for (i = 0; i <  myTxtReplace.length; i++) {
              var myCurArray = myTxtReplace[i];
              app.findTextPreferences.findWhat = myCurArray[0];
              app.changeTextPreferences.changeTo = myCurArray[1];
              myTextFrame.parentStory.changeText();
         app.findTextPreferences = NothingEnum.nothing;
         app.changeTextPreferences = NothingEnum.nothing;
    function replaceGrep() {
         app.findGrepPreferences = NothingEnum.nothing;
         app.changeGrepPreferences = NothingEnum.nothing;
         for (i = 0; i <  myGrpReplace.length; i++) {
              var myCurArray = myGrpReplace[i];
              app.findGrepPreferences.findWhat = myCurArray[0];
              app.changeGrepPreferences.changeTo = myCurArray[1];
              myTextFrame.parentStory.changeGrep();
         app.findGrepPreferences = NothingEnum.nothing;
         app.changeGrepPreferences = NothingEnum.nothing;
    function myRemoveHyperLinks(){
         if (myDoc.hyperlinks.length > 0){
              for(var myCounter = myDoc.hyperlinks.length; myCounter > 0 ; myCounter--){
                   myProblems++;
                   myDoc.hyperlinks[myCounter - 1].remove();

  • Contribute CS3 not showing css styles

    I have 3 almost identical sites I am using Contribute to
    allow users to
    add content. All internal so I can' show URL's.
    The mystery began when I added the third site. On the other
    two when
    someone edits a page all the css styles show in the Style
    drop down panel.
    Not so on the third site. I created the other sites a while
    back using
    Contribute 3. The new one using CS3.
    I have checked over and over the role settings for each site
    to make
    sure I don't have something unchecked or somehow have a
    different
    setting between the three.
    No matter what settings I use in the Styles and Fonts panel,
    the Styles
    dropdown shows non of the styles included in the linked css
    file.
    Alex

    Is the style sheet also present in the document (f.i. by
    linking it in the head section: <link href="css/stylesheet.css"
    rel="stylesheet" type="text/css" media="screen" />)? The styles
    you want to be displayed in contribute always have to be linked to
    the document.

  • Dreamweaver CS3 freezes when "Display Styles" is on

    Hi guys, I hope you can help me here. Recently I changed computers and am now experiencing this problem with all the webpages I work with. When I open a page, everything seems fine until I click in either the code view or design view, then it freezes with no error message. I then have to close the program through the task manager.
    If I go to View > Style Rendering, then turn off Display Styles, then everything works great, but it just doesn't looke right. When I turn it back on it freezes again.
    I think that this has something to do with the CSS files, but I don't know much about this. If it helps to see the pages, they are at www.iscatech.com.
    Thank you in advance.

    Brett,
    Hi guys, I hope you can help me here. Recently I changed computers and am now experiencing this problem with all the webpages I work with. When I open a page, everything seems fine until I click in either the code view or design view, then it freezes with no error message. I then have to close the program through the task manager.
    If I go to View > Style Rendering, then turn off Display Styles, then everything works great, but it just doesn't looke right. When I turn it back on it freezes again.
    I think that this has something to do with the CSS files, but I don't know much about this. If it helps to see the pages, they are at www.iscatech.com.
    I looked at your web page. First of all there is some duplicated markup in the <head>. That's probably not your problem, but your page will load faster and more predictably if you clean that up.
    I opened StyleSheet.css. It has a set of styles that are duplicated 39 (not a typo: thirty nine) times! Have you waited to see if DW eventually loads your page? It could just be taking it a long time to process that 147KB file. Try removing the duplicate styles.
    I don't have CS3 anymore, but I can open it in CS4.
    With that said, it's still possible that you may have a style (or combination of styles) that is causing CS3 to hang. Try using the binary process of elimination to isolate the CSS rules. In other words:
    1. Comment out half of your existing styles
    2. Restart DW
    3. If it hangs, go to step #1
    4. If it does not hang, continue
    5. Un-comment half of the styles you commented out in the previous iteration
    6. Go to Step #2
    Repeat until you have it isolated to the minimum number of rules.
    HTH,
    Randy

  • [JS,CS3,CS4] Converting Paragraph numbering to text

    I'm trying to add line numbers by applying paragraph numbering to selected text (which I call "myText"), then converting numbers to text (then later I'll use GREP to remove the period and shift them to the right).
    I'm new to scripting, and wonder why the following doesn't work:
    myText.bulletsAndNumberingListType=1280601709;
    myText.convertBulletsAndNumberingToText();
    The first line seems to add the numbering as I'd like, but the second line just makes them disappear again!
    Thanks for any help you can give -- Jeremy

    I just had a similar problem.
    I have no idea whether my solution works in CS3.
    ( function() {
         var doc = app.activeDocument;
         // the image page item
         var r = doc.rectangles.item(0);
         // the destination textframe to hold the inline
         var tf = doc.textFrames.item(0);
         // it should already be tagged.
         // create a nested, blank tag
         var xe = tf.associatedXMLElement.xmlElements.add("bla");
         // copy the rect as inline
         xe.placeIntoInlineCopy(r,true);
    Dirk

Maybe you are looking for

  • Can't access User type using Synonyms/Grant

    Hi, We have a Stored Proc and it accepts a usertype. We are sending info from Java using JDBC and trying to get the results back. If I use the owner of the schema for connection it works fine. If I use a different schema user which has synonyms and g

  • Unable to connect to host on port 4241

    HI SAPers, I have started the gui, now that I am trying to connect to server I am getting the following error: Error while connecting to communication partner - see preceeding messages. Could not connect to host lxxxxxxx on port 4241. java.net.Connec

  • Singleton class instantiated several times

    Hi all, I am trying to implement an inter-applet communication using a singleton class for registering the applets. The applets are in different frames on my browser; they are placed in the same directory and they use the same java console, so I am p

  • Can't download adobe 10.1 for mac os 10.4.1 Power Pc.

    I have a mac os 10.4.1 power pc.  I go to the adobe site and try to use archives to get flash player 10. It prompts me to adobe download and it only gives choice for "INTEL" versions and I have a power pc.  The site is not user friendly for my operat

  • HT4623 Why wont my Iphone 5 activate after IOS7 update

    My phone won't activate, even though I updated through Itunes though and no its like something is wrong with my network?