InDesign script for a text of color replace all other lines in a text box

I have a very long list of names I need to alternate the color CMYK, all other rows value.

I found this script on another thread to adobe changing the hue of every 3rd line:

var i, p; for (i=0; i<app.selection[0].paragraphs.length; i++) { p = app.selection[0].lines[i]; if (i%3 === 2) { p.fillTint = 50; } } 

I tried to change the script to change the value of CMYK, do this:

var i, p; for (i=0; i<app.selection[0].paragraphs.length; i++) { p = app.selection[0].lines[i]; if (i%2 === 1) { p.colorValue=[0,100,100,0]; } } 

But using 'colorValue' is not supported. How can I change the script to do all the other lines in a text box to change the value of the color?

var i, p, color;
for (i=0; i 
         

Tags: InDesign

Similar Questions

  • set a background image for a text box or label?

    Hey gang,

    I would like to put a background image for a text box or label.

    is there a way to do this?

    also if I put the bottom level of the container root and do the rest orders slightly transparent (opacity: 0.8 or something), the background appear through?

    Thank you

    J

    for your text box, define backgroundVisible: false & and/or upgrade the opacity to the low enough that you can see through it and place your background image behind the text box. (I belive opacity changes will affect the text as well).

    for labels, I used the method of the container as you described.

  • How to set up make-style for the text box in the apex.

    Hi all

    I created a text box in the apex and now I'm changing the font for that text box style and I applied here like this is this correct one or any suggestions on this.
    --
    HTML Form Element Attributes: style="font-family:Arial;font-style:Regular;
    The apparoach is the right one or not.
    {code}
    
    
    Thanks,
    Anoo..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    David wrote:

    I created a text box in the apex and now I'm changing the font for that text box style and I applied here like this is this correct one or any suggestions on this.

    --
    HTML Form Element Attributes: style="font-family:Arial;font-style:Regular;{code}
    The apparoach is the right one or not.
    

    N ° attribute is missing a quote from endpoint, and "Regular" is not a valid value for the http://reference.sitepoint.com/css/font-style">make style property.» Valid values are normal | italic | oblique as shown.

    Also, it is recommended to specify a default value of generic downturn at the end of the specifications of font family :
    {code}
    style = "do-family: Arial, Helvetica, without serif;" make-style: normal; »
    {code}
    (There's really no need to ask such questions icies and waste of time to wait for answers: to bookmark a good reference CSS like Sitepoint link above or the http://www.w3.org/TR/CSS21/#minitoc"> W3C CSS specification and refer to them as needed.")

  • Definition of default font for the text box in Acrobat XI

    Projects that I am working, I scan in all copies of documents I acquire and add at the bottom of the first page of the relevant information, that is, the source of recordings, volume, and page, using the tool text box (or typewriter).

    In earlier versions of Acrobat, I could choose a font style once and it has carried over to any subsequent document, I proceeded. In Acrobat Pro XI, it always happens as Minion Pro and I need to change in Arial Black every time. Is there a way to define Arial Black as the default choice for the text box?

    For what it's worth, I use Windows 8.

    Thank you.

    I came across a work-around for this for Acrobat Pro XI.  It is a process in two steps and a little heavy, but it works.

    First, go and add your text box and everything what you need text.  After having done that, select all the text, then bring up a bar of properties of the text box text by placing your cursor in the toolbar area and select 'Properties Bar' top of the page, right click or simply press Ctrl + E.  The properties of the text box bar will appear (floating, but not all the time).  Let the selected text, and then change the font properties to what you need.

    Secondly, deselect the text, select the border of the text box, make a right click and then select "Make current properties default" in the pop-up window.  FYI, the property bar to the box text will be changed from a floating real estate bar at this time, so if you need to make more detailed changes, simply close the bar and back to Ctrl + E to call upwards and make other changes.

    I use Windows 7 64-bit.

  • How can I fix a black and white screen on the air from my iPad? I rebooted it and ran the last updated IOS 9.2 on it. It is stuck and won't return to the color. All other functions work except this.

    How can I fix a black and white screen on the air from my iPad? I rebooted it and ran the last updated IOS 9.2 on it. It is stuck and won't return to the color. All other functions work except this.

    Have you checked the settings > General > accessibility > greyscale > power off.

    If this does not work ty settings > General > accessibility > zoom > on. Triple, tap the screen with three fingers. Tap choose filter. Click None. Triple, tap the screen to get rid of the menu zoom. If you have enabled greyscale in zoom you can disable it in zoom.

  • Is it possible to write a script for underlined text export to PDF?

    When I make changes in the financial document, I must emphasize this purpose to show what I edit, these underscore was called "markup". And then print (paper version) and gen (PDF) of the amendment, which means I have to print and gen text underlined (or called markup text) after modification.

    sample PIC:

    back markup.jpg

    If:

    Customer requires a new version of the markup, which means I have to change the last beacon color (color of the underline to the last amendments) in 'back' and then make new 'red' as this markup:

    red markup.jpg

    What I want:

    is it possible to write a script for printing and gen only markup in the document text all open

    and I want two versions

    (1) all text markup gen no matter the color of the underline

    (2) the red color of the markup text gen

    Thank you!

    Hi HarveyLiu,

    Why, you ask? It will export the pages who pointed out the text.

    var doc = app.documents;
    app.findTextPreferences = null;
    app.findTextPreferences.underline = true;
    for(var i=0;i
    

    Kind regards

    Cognet

  • Edit an Indesign script for me?

    Hi all!

    I'm fairly new to Indesign scripting and I have a script here that I would have changed.

    This script puts a several page pdf in an Indesign file and add pages as needed. From now this script appears in a dialog box that asks you what document I want than the PDF to be placed in, and I would like to have this dialog box eleminated and have the script automatically place the pdf file in the document I have active. This script also asked which page to start to put the pdf file on and I would if it would simply just start automatically on the first page of the Indesign document active without even asking me. Someone would be willing to make these changes for the script below and zip code on this thread? Let me know if I did something clear.

    var myDocument = app.activeDocument;
    //Get the current page.
    main();
    function main(){
      //Display a standard Open File dialog box.
      var myPDFFile = File.openDialog("Choose a PDF File");
      if((myPDFFile != "")&&(myPDFFile != null)){
      var myDocument, myPage;
      if(app.documents.length != 0){
      var myTemp = myChooseDocument();
      myDocument = myTemp[0];
      myNewDocument = myTemp[1];
      }
      else{
      myDocument = app.documents.add();
      myNewDocument = false;
      }
      if(myNewDocument == false){
      myPage = myChoosePage(myDocument);
      }
      else{
      myPage = myDocument.pages.item(0);
      }
      myPlacePDF(myDocument, myPage, myPDFFile);
      }
    }
    function myChooseDocument(){
        var myDocumentNames = new Array;
        myDocumentNames.push("New Document");
        //Get the names of the documents
        for(var myDocumentCounter = 0;myDocumentCounter < app.documents.length; myDocumentCounter++){
            myDocumentNames.push(app.documents.item(myDocumentCounter).name);
        }
        var myChooseDocumentDialog = app.dialogs.add({name:"Choose a Document", canCancel:false});
        with(myChooseDocumentDialog.dialogColumns.add()){
            with(dialogRows.add()){
                with(dialogColumns.add()){
                    staticTexts.add({staticLabel:"Place PDF in:"});
                }
                with(dialogColumns.add()){
                    var myChooseDocumentDropdown = dropdowns.add({stringList:myDocumentNames, selectedIndex:0});
                }
            }
        }
      var myResult = myChooseDocumentDialog.show();
      if(myResult == true){
      if(myChooseDocumentDropdown.selectedIndex == 0){
      myDocument = app.documents.add();
      myNewDocument = true;
      }
      else{
      myDocument = app.documents.item(myChooseDocumentDropdown.selectedIndex-1);
      myNewDocument = false;
      }
      myChooseDocumentDialog.destroy();
      }
      else{
      myDocument = "";
      myNewDocument = "";
      myChooseDocumentDialog.destroy();
      }
        return [myDocument, myNewDocument];
    }
    function myChoosePage(myDocument){
        var myPageNames = new Array;
        //Get the names of the pages in the document
        for(var myCounter = 0; myCounter < myDocument.pages.length;myCounter++){
            myPageNames.push(myDocument.pages.item(myCounter).name);
        }
        var myChoosePageDialog = app.dialogs.add({name:"Choose a Page", canCancel:false});
        with(myChoosePageDialog.dialogColumns.add()){
            with(dialogRows.add()){
                with(dialogColumns.add()){
                    staticTexts.add({staticLabel:"Place PDF on:"});
                }
                with(dialogColumns.add()){
                    var myChoosePageDropdown = dropdowns.add({stringList:myPageNames, selectedIndex:0});
                }
            }
        }
        myChoosePageDialog.show();
        var myPage = myDocument.pages.item(myChoosePageDropdown.selectedIndex);
        myChoosePageDialog.destroy();
        return myPage;
    }
    function myPlacePDF(myDocument, myPage, myPDFFile){
      var myPDFPage;
      app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
      var myCounter = 1;
      var myBreak = false;
      while(myBreak == false){
      if(myCounter > 1){
      myPage = myDocument.pages.add(LocationOptions.after, myPage);
      }
      app.pdfPlacePreferences.pageNumber = myCounter;
    
         myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
      if(myCounter == 1){
      var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
      }
      else{
      if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
      myPage.remove();
      myBreak = true;
      }
      }
      myCounter = myCounter + 1;
      }
    }
    var myPDFFrame =  myPlacePDF.parent;
    

    Thank you very much in advance for your help! I greatly appreciate it!

    This is a rewrite for you. I also added some code to remove empty pages in the document.

    /*

    PlaceMulitpagePDF condensed by Skemicle Script

    */

    If (parseFloat (app.version)<>

    main();

    on the other

    app.doScript (principal, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Place Multipage PDF");

    main() {} function

    var myPDFFile is File.openDialog ("choose a PDF file");.

    If ((myPDFFile! = "") & (myPDFFile!) (= null)) {}

    var = app.activeDocument myDocument,

    myPage = myDocument.pages.item (0);

    var myPDFPage;

    app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;

    var myCounter = 1;

    var myBreak = false;

    while(myBreak == false) {}

    If (myCounter > 1) {}

    my page = myDocument.pages.add (LocationOptions.after, myPage);

    }

    app.pdfPlacePreferences.pageNumber = myCounter;

    myPDFPage = myPage.place (File (myPDFFile), [0,0]) [0];

    if(MyCounter == 1) {}

    New var features = myPDFPage.pdfAttributes.pageNumber;

    } else {}

    if(myPDFPage.pdfAttributes.PageNumber == myFirstPage) {}

    myPage.remove ();

    myBreak = true;

    }

    } myCounter = myCounter + 1;

    }

    } var pages = app.activeDocument.pages;

    for (c = 0; c<>

    If (pages.pageItems.length [c] == 0) {}

    pages [c]. Remove();

    }

    }

    }

  • How do you define the background color for a text box

    In older versions, that I was able to set the background color in a text box, I want to do the same in this newer version and I can not find where I would choose this option

    Hi alanb.

    Please type your text in the text box, now in the right pane of comments you will see your text, right click & Select "Properties".

    In the properties box, select the fill color to fill in the color in the text box.

    I would like to know if it works.

    Kind regards

    Nicos

  • PDF-to-InDesign script for the folio

    Hello

    I downloaded the script above to create a folio of pdf in ID6. I would use it to publish on devices Android, but understand that a Horizontal scrolling in the DPS should be turned off to enable the pinch to zoom on Android devices feature. However, when we use this script, it creates an article in ID 2 page (with the exception of the front and back covers), that is, when Horizontal scrolling is disabled, scrolling occurs on the Android device which makes it very confusing to navigate the magazine.

    My questions are, we can modify the script so that it produces unique page ID files and if so will pinch to zoom work with specific items?

    Thank you

    Charlotte

    Hello

    I adopted the script for several scenarios, which may be useful. It can certainly be more managed.

    Claudio, to answer your question, Yes, you can adjust the offset value in the script. I did it for our PDFs with versions below.

    I made changes in the script which include the following:

    1. Drop the required naming convention. Page names should be ordered now 1 - x. Ex: 1.pdf "Page, 'Page 2', 'Page 35.pdf', etc. I added a sort function to sort problems where there is a # different numbers in the numerical value of page. Note that the word "Page" is not necessary.
    2. This allows spaces in file names.
    3. Note that the script still requires the sidecar to the command files correctly. Folio Builder will import an article "Page 10" before "Page 2"when you perform an import multiple article.»

    Here is one who creates 1024 x 600 H & V. page layouts (target: Kindle Fire 7 "SD.) Note, due to a limitation of Android/DPS of the flattened chimneys not being is no PtZ, you can not PtZ.)

    Here is one who creates layouts of 1280 x 800 H & V. (target: Kindle Fire 7 '' HD Note, due to a limitation of Android/DPS of the flattened chimneys being don't not PtZ, you can't PtZ.)

    Here is one that creates only provisions of 1280 x 800 h. (target: light the fire 7 '' HD.) Given that this includes no flat batteries, you can use PtZ).

    Here is one who creates layouts of 1920 x 1200 H & V. (target: Kindle Fire 8.9 "HD Note, due to a limitation of Android/DPS of the flattened chimneys not being don't not PtZ, you can't PtZ.)

    We were just testing some of these options, in that no guarantees are these infallible. However, if you encounter a problem, feel free to shoot me a PM and I'll see if I can fix it for you.

    Concerning the PtZ is not not available for items flattened in the Android, my discussions Adobe viewers has no desire to fix this / add features to their current viewers focus on the air. When they release a viewer Android native (Q1?) it would probably be a valid request if it is not available from the start.

    See you soon

  • How can I activate the spell for a text box that is just a line, for example submitted by e-mail?

    In an earlier version of Firefox, I found a site somewhere that told me what to do to turn on spell checking for text boxes that are just a line. I'm used to be able to send an e-mail with a subject that was not a misspelling. Now, it does not work. Please tell me how I can activate it once again. I'm on a Mac using Firefox 6.0.2. Thank you!

    See:

    You can set the pref layout.spellcheckDefault to 2 on the topic: config page.

    To open the topic: config page, type Subject: config in the address bar (address) and press the 'Enter' key, as you type the url of a Web site to open a Web site.

    If you see a warning then you can confirm that you want to access this page.

    • Use the filter at the top bar of the on: page config to more easily spot a preference.
    • Preferences that have changed also show "BOLD" (user set).
    • Preferences you can restore the default value or change via the context menu.
  • Regarding events for the text box

    Hi all,

    I'm new with the Labview I have it the simple program I use the tab control in the tab control I have set Num control a (text box) in the tab 1 and Num B in the tab2 and control on the front panel, I place the indicator of Num C.I want when I set the value of a control number and enter then value goes to the led num c.Simillarly when I put the value B number and press on enter, then the value of B will go to the num indicator. How do I put the event on the text box as the value of A or B num command will go num indicator capers press on enter for the number corrosponding control.

    Due to the fact that I can't delete my post, I'm editing only say I am ashamed of what my response was completely wrong because of the mistake of reading your question :/

  • A script for the e-mail notifications to all detectors of vCenter device 54 default works as expected, however it ends with an error.

    Hello

    We test the automatic configuration of alerts by email of all the alarms of 54 by default since version 5.0 of the device of vCenter.

    Since this is something that we intend to do on all the installations/upgrades, it can be a time-consuming task having to manually set each alarm set on each vCenter so I indicated to an article in the blog of VMpros which appears to address a similar task and who suggests using PowerCLI script to take care of this:

    http://blog.vmpros.nl/2011/07/04/VMware-change-alarm-actions-with-PowerCLI/

    I fixed the script from its original version because it shouldn't change certain actions of alarm to send alarm notifications at a different e-mail once a week. Instead, we will propose a one-time activity.

    After configuring vCenter server connection information and change the e-mail addresses, I have successfully tested the custom script to add notifications by e-mail to a test alarm (named "Test alarm") to a simple action, that I had created earlier (turn on/off a virtual computer in our laboratory). The added script notifications by e-mail to our alarm test as expected without error.

    Before you change the script to add e-mail notifications to all 54 defect detectors as needed, I decided to test the custom script against one of the predefined alarms (named 'Host the status of material power'). While the script added notifications by e-mail to the alarm 'Material receiving power status' as expected, he finished with errors.

    I just want to make sure that our custom script contains no script errors before using it on all the installations/upgrades (any suggestion or criticism is welcome).

    I pasted the error resulting from the prompt of Windows PowerShell commands below.

    Thank you and best regards,

    Massimiliano

    ==================================================

    PowerCLI D:\ >.\Change_Alarm_Datacenter.ps1

    Action Type Trigger

    -----------     -------

    SendEmail...

    SendEmail...

    SendEmail...

    New-AlarmActionTrigger: 21/05/2012-16:35:11 new-AlarmActionTrigger A

    specified parameter was incorrect.

    D:\Change_Alarm_Datacenter.ps1:37 car: 82

    + Get-AlarmDefinition-name '$actAlarm1 ' | Get-AlarmAction | New-AlarmActionTri

    walking landing < < < < - StartStatus 'green' - EndStatus "yellow."

    + CategoryInfo: NotSpecified: (:)) [-AlarmActionTrigger] new, Inva)

    lidArgument

    + FullyQualifiedErrorId: Client20_AlarmServiceImpl_NewAlarmActionTrigger_

    ViError, VMware.VimAutomation.ViCore.Cmdlets.Commands.Alarm.NewAlarmActionT

    rigger

    UID: /VIServer=administrator@vcenter5:443/Alarm=Alarm-alarm-17/SendEma

    ilAction = 1508771755/AlarmTriggeringActionTransitionSpec =-83030421

    6.

    StartStatus: Green

    EndStatus: yellow

    Repeat: false

    AlarmAction: SendEmail

    UID: /VIServer=administrator@vcenter5:443/Alarm=Alarm-alarm-17/SendEma

    ilAction =-1903891658/AlarmTriggeringActionTransitionSpec =-8303042

    16.

    StartStatus: Green

    EndStatus: yellow

    Repeat: false

    AlarmAction: SendEmail

    UID: /VIServer=administrator@vcenter5:443/Alarm=Alarm-alarm-17/SendEma

    ilAction =-1765994019/AlarmTriggeringActionTransitionSpec =-8303042

    16.

    StartStatus: Green

    EndStatus: yellow

    Repeat: false

    AlarmAction: SendEmail

    ==================================================

    Okay, I think I found the problem.

    You set 3 actions on this alarm (3 x Email).

    This means that it

    Get-AlarmDefinition -Name "$actAlarm1" | Get-AlarmAction
    

    Returns 3 objects (one for each action).

    Unfortunately, the New-AlarmActionTrigger cmdlet wants 1 as input Action, not a table object.

    The solution is to select the Action of explictely for which you want to change the trigger.

    Something like that

    Get-AlarmDefinition -Name "$actAlarm1" | Get-AlarmAction | Select -Index 0 | New-AlarmActionTrigger -StartStatus "Green" -EndStatus "Yellow" Get-AlarmDefinition -Name "$actAlarm1" | Get-AlarmAction | Select -Index 1 | New-AlarmActionTrigger -StartStatus "Red" -EndStatus "Yellow" Get-AlarmDefinition -Name "$actAlarm1" | Get-AlarmAction | Select -Index 2 | New-AlarmActionTrigger -StartStatus "Yellow" -EndStatus "Green"
    

    Beware, the script does not remove the old triggers, so you will end up having several triggers for actions.

    First use the remove-AlarmActionTrigger to remove any existing triggers.

  • Automatically change the size and have a fluid for dynamic text boxes

    I am seized of text from a thread xmle in the dynamic text boxes. I have boxes of static text that titles each.

    I need help to make the dynamic text boxes if the xml text is larger & move the static text boxes, so that they don't start writing more.

    The code that I used to make the text in the dynamic areas is very simple:

    var xmlData:XML = new XML ();
    var theURL_ur:URLRequest = new URLRequest ("xml.xml");
    var loader_ul:URLLoader = new URLLoader (theURL_ur);
    loader_ul.addEventListener ("complete", fileLoaded);

    function fileLoaded(e:Event):void
    {
    xmlData = XML (loader_ul.data);

    Dummy_txt. Text = xmlData.record1.Dummy;
    Dummy_txt2. Text = xmlData.record1.Dummy2;
    }

    For example

      forum pic.JPG

    You must set your dynamic text boxes autoSize property, while they will increase if necessary:

    myTextField.autoSize = TextFieldAutoSize.LEFT;

    Then, you can use the textHeight field property to get the height of the text in pixels and move the other fields accordingly:

    staticTitle2.y = dynamicText1.y + dynamicText1.textHeight + 10;

  • InDesign 5.5, fill text box...

    I work with ID 5.5 and I have a text box with text of the drop with a shadow in it.  I want to fill the bottom of the text box with a pattern fill or a picture, so my shadow text sits on top of the filling.

    Can not find a way to do it.

    Can someone tell me please how can I achieve my goal?

    Thank you

    Cliff

    It's because you can't. Put the chart below the text block.

    Bob

  • script to insert the new master on all other pages

    I have an indesign document with 131 pages (front of postcards). I should add the back of the postcard (master) for all other pages. I don't want to do it manually because of the time and that I will need to do this again. Someone at - it a script that will allow insertion of still blank pages on pages of numbered and then I can apply the master page to all pages?  Something will help you. Thank you!!

    Just found out that the script on this forum http://forums.adobe.com/message/3223771#3223771#3223771 does it perfectly.

Maybe you are looking for