Color chart rename using Java script

Hi friends,

I tried to rename the shades by using the following script,

This does not work for the tinted shades. Can you please help me to solve this problem.

myDocument var = app.activeDocument;
for (i = 4; i < myDocument.swatches.length; i ++)
{
var mySwatchName = myDocument.swatches.item (i) .name;
myDocument.swatches.item (i) .name = "XX_" + mySwatchName;
}
our var = myDocument.swatches.length - 4;
Alert ("DONE and" amendments + "renowned color chart");

Thanks in advance...

Hello

I copied the code and tried again, but it does not work because "Tone" was cut out by the SPACE such as 'T int' when I pasted here.

I pasted the code again, but it will be added SPACE between 't' and 'int '. ??? Sorry, please delete SPACE and try again.

{if (myDocument.Swatches.Item (i) .getElements () [0] .constructor.)} (Name==='Tint')}

It works for me on OSX 10.6.4 + InDesign CS3, CS4.

Shade of gradient swatches ==> renamed

Tint Shade ==> based on color chart

Thank you

Tags: InDesign

Similar Questions

  • Using java script with QML, save a text in a variable of java script and showing in a label

    I'm trying to find a way to take a text entered by the user into a text field and display it in a label using java script. The trickiest part is I want to be seen in the label after restarting the application.
    Any idea?
    Should I use a JS file with functions. If so, what are best practices?

    Thanks in advance!

    This example uses a little bit of C++, I'm not sure if this can be done with purely JS

    in your text box or label apply onTextChanged you probably want to have a Setup button to activate & deactivate the area of text, or if they delete it, the text of the label would be erased

    . QML

    TextArea {
        id: myTextArea
        onTextChanged: {
            myTextArea.text = myLabel.text;
            //you could also apply ^ to a button's onClicked function etc
            App.saveValueFor("mySavedText" myTextArea.text);
        }
    }
    Label {
        id: myLabel
        text: App.getValueFor("mySavedText", "");
    }
    

    App.saveValueFor (); QSettings uses will have to be reset in your ApplicationUI.cpp & .h

    .cpp

    App is obtained by setting a context property

    qml->setContextProperty("App", this);
    
    QString App::getValueFor(const QString &objectName, const QString &defaultValue)
    {
        QSettings settings;
    
        // If no value has been saved, return the default value.
        if (settings.value(objectName).isNull()) {
            return defaultValue;
        }
    
        // Otherwise, return the value stored in the settings object.
        return settings.value(objectName).toString();
    }
    
    void App::saveValueFor(const QString &objectName, const QString &inputValue)
    {
        // A new value is saved to the application settings object.
        QSettings settings;
        settings.setValue(objectName, QVariant(inputValue));
    
    }
    

    all

    public:
    
        Q_INVOKABLE
        QString getValueFor(const QString &objectName, const QString &defaultValue);
    
        Q_INVOKABLE
        void saveValueFor(const QString &objectName, const QString &inputValue);
    

    You'll also need to slect the permission of files shared in the descriptor for QSettings bar to work

  • Cannot access a Web site using Java Script

    Cannot access a Web site using Java Script. I'm not sure what it blocks I use Win 7, Avast free, AntimalwareBytes.
    I get a pop up window with
    Name: mcs
    Location: http://myspeedtest02.windstream.net  
    say "application blocked by security settings, blocking the untrusted application.
    I don't know what it blocks, but suspect it is related to the security of Windows.
    I think that the Java Applet is blocked, but I would like to run this test of speed from my ISP.  I tried to access the website of Google Chrome and IE, with the same result. Nobody knows what this block and how to unlock it?

    This is actually not JavaScript, it's Java.  Despite the name, they are really very very different.

    Java itself can be dangerous, especially if it is not a trusted application.  It is my sincere recommendation that you do not continue.

    If you want anyway, you can go into your control panel, open the Java settings and set it to allow untrusted applications.

  • get the id of the component using Java Script

    I have three text fields that I am trying to reset it using Java Script in the Joint Strike Fighter. When, in short, all the text fields three triggered event calls the method below and not reset the other two fields to the point.

    I need to know what text field is under discussion, so I can reset the other two.

    The question that I have does not have the correct id name using evt.getSource ();. I get a big long text for txtField, that looks like: AdfRichInputText [oracle.adf.RichInputText] id = it2

    I'm trying to get just "it2", how do I do this?

    < af:resource type = "javascript" >

    function resetFields (evt) {}

    var txtField = evt.getSource ();

    Alert (txtField);

    If (txtField == 'it2') {}

    var var1 = AdfPage.PAGE.findComponentByAbsoluteId ('it1');

    var var3 = AdfPage.PAGE.findComponentByAbsoluteId ('it3');

    var1. SetValue("");

    var3. SetValue("");

    }

    }

    < / af:resource >

    Thank you very much.

    It worked:

    var txtField = evt.getSource ();

    ID var = txtField.getProperty ("id");     -Returns the name of id for the event source.

  • I'm looking for shades of color like Winsor Newton color chart to use Photoshop CC

    I'm looking for shades of color like Winsor Newton color chart to use Photoshop CC. Does anyone know where to get these color charts to use with photoshop CC?  . And is it safe to download. Thank you

    DeviantArt is fairly reliable Winsor Newton swatches of rnbluvva on DeviantArt

  • How and where to use Java script to create a new button in the page of detail of the object

    Hi all

    I want to create "New/Add button" in the page of detail of the object. If I'm not mistaken I need to use the java script for this, but could you please let me know how and where to use Java script to create a new button in the page of detail of the CRMOD object.

    Thanks in advance.

    Kind regards
    Manish

    Any related object on the details of the page should have an 'Add' or 'New' or the two default buttons - it of a vanilla feature and will do the required action.

    If you want to change this behavior and do something delicate you will potentially have to to go for javascript. You must add the javascript code in a web custom tab on this object.

    Admin--> Application Customization--> Contact--> Applet Web Contact

    Now add your javascript in the code box, after selecting the type = HTML for this web applet, expose this web applet on the Contact details page layout and your javascript will be called every time this page is loaded.

    Check this document online to see how javascript can be integrated into the CRM on demand http://helponmyproject.com/TTOCOD/

    See you soon!
    Royston

  • The parameters section passes from one form to another form (using java script)

    Hello

    IAM two forms as A and B

    in my form of results of research/B that allows to display the results on the basis.

    If I call this shape A it should take the values of A and proceed to page B and run the query.



    I have my VO as

    Select * from cust_ont_order_details where ORDER_ITEM =: 1;


    And I wrote a method called 'initQuery' and the execution of this method as a result and Iam passing here bind values.


    ' Public Sub SearchParams (pageContext OAPageContext, OAWebBean webBean)
    {
    CustAttFindASpareViewVOImpl vo = getCustAttFindASpareViewVO1();
    String ItemId = "";

    If (pageContext.getParameter ("ItemId")! = null & &! pageContext.getParameter("ItemId").equals(""))
    {
    System.out.println("0001");
    StateSearch = pageContext.getParameter("ItemId").toString ();
    vo.setWhereClauseParam(0,ItemId);
    }
    on the other
    {
    vo.setWhereClauseParam(0,null);
    }

    }


    This works very well if am looking for page B, how can I pass values to a?

    IAM using Java script to open the B of a form.

    Mahesh

    If the two are OA pages have your tried using the pageContext.putSessionValue method.

    Thank you
    AJ

  • Problem to find the Position of the cursor by using Java Script for an input TextField

    Hello

    I have a problem to find the position of the cursor in a field inputText component.

    The following code of java script to achieve. The same functionality works fine if I run in a simple html page. But when it is used the same javascript inside the jsff does not the position of the cursor.
    var adfComponent = AdfPage.PAGE.findComponentByAbsoluteId("r1:1:it3");
    var adfComponentClientId = adfComponent.getClientId();
    var div = document.getElementById(adfComponentClientId + '::content');
    div.focus();
    var docSelectionRange = document.selection.createRange();
    
    docSelectionRange.moveStart ('character', -div.value.length);
    
    var iCaretPos = docSelectionRange.text.length;
    
    alert("iCaretPos --> "+iCaretPos);  ---> This statement always returning '0'. Instead, i want the cursor position inside the text box.
    Please let me know what I'm missing.

    For your reference, sending the sample page html that works fine with the same kind of code.
    <html>
     
     <body style="font-family: tahoma; font-size: 8pt;">
     
      <script language="JavaScript">
     
       /*
       **  Returns the caret (cursor) position of the specified text field.
       **  Return value range is 0-oField.length.
       */
       function doGetCaretPosition (oField) {
     
         var iCaretPos = 0;
              alert(oField);
         if (document.selection) { 
     
           // Set focus on the element
           oField.focus ();
     
           // To get cursor position, get empty selection range
           var oSel = document.selection.createRange ();
     
           // Move selection start to 0 position
           oSel.moveStart ('character', -oField.value.length);
     
           // The caret position is selection length
           iCaretPos = oSel.text.length;
         }
     
         // Firefox support
         else if (oField.selectionStart || oField.selectionStart == '0')
           iCaretPos = oField.selectionStart;
     
         // Return results
         return (iCaretPos);
       } 
      
     
     
      </script>
     
      <form name="blah">
     
       Text Field: <input type="text" name="nameEdit" value="">
       <input type="button" value="Get Caret" onClick="document.getElementById('where').value=doGetCaretPosition (document.forms[0].elements[0]);">
    <input id="where">
      
     
      </form>
     
     </body>
     
    </html>
    Thank you and best regards,
    Kiran kristelle

    Published by: Kiran kristelle on February 6, 2012 12:00

    ... had the chance to look at the source code of the sample. ADF Faces renders text as HTMLTextArea fields when the value of the rows property. The JavaScript code used in the example of client works differently for FF and IE if the input is a text box. This could be a problem in IE or just used JavaScript code. The rows back to a single line (remove) property makes the text as HTML input feldworking with the JavaScript for IE and FF.

    Frank

  • How to create indesign using Java Script

    I am new to indesign and want to create indesign application using JavaScript.

    When I use AppleScript to create the Application Indesign I use this statement

    Tell application "Adobe InDesign CS5.5"

    myDocument to make document with the properties of the value

    tell the end

    Application InDesign create successfully.

    How to create the Application Indesign using JavaScript?

    or what is set equivalent to (tell application "Adobe InDesign CS5.5") in Java Script.

    There is a sample java script given on the forum or in the sdk. These departure example with app.

    When I debug these java script using ExtendScript ToolKit 3.6 it gives error on app (application not defined). I think that this app AI application object.

    How to create indesign application object app in javascript?

    Although this script runs successfully when I put these script in C:\Program Files\Adobe\Adobe InDesign CS5.5\Scripts

    and executing these script use the Scripts panel (choose window > utilities > Scripts), and then double-click the script name in the Scripts panel in indesign application. But in this case I have indesign application start and then choose window > utilities > Scripts, and then double-click the script name in the Scripts panel.

    I want to create Application Indesign (instance), using JavaScript.When I run or (debug) my JavaScript in any javaScript tool as ExtendScript ToolKit 3.6 then Indesign application should start, as in the Apple Script.

    Thank you

    long story short... NO!

    However, if you run the script from ESTK, you need not copy the script in the folder "Scripts". Do not know exactly if that's what you want.

  • I'm not able to get the value of an element in the region from the table using Java script

    I have a fixation with two columns area, when the user tries to add a new line without having to fill in the line above, then it should throw an exception. It is the custom page and the home region is located at the end of my page so normal exception raises at the top of the page where the end user referred to in the current. I need to go with popup warning. I built a java script in PR

    code:

    OkButton OASubmitButtonBean = (OASubmitButtonBean) webBean.findChildRecursive ("addrow");

    okButton.setOnClick ("javascript: a = document.getElementById ('prompt');" + "alert ('outside ' + (a.value));" +)

    "if ((a.value)! = ") {input = alert ('check' + (a.value)) ;}} else {alert (' inside the else'+ (a.value));} ");"

    The code above works for entering the message text in the header area, but it is does not make any value if the sub-region of table in advance. Kindly share your point of view on this issue.

    attach_js_issue.png

    This code will give you the same ID only.

    Check the "View Source" code generated from the browser.  https://support.Google.com/AdSense/answer/181951?hl=en

    See you soon

    AJ

  • The color charts to use?

    Hello

    I need to make a quick run of 100 prints to a local print shop where they'll be printing on a digital printer. I guess the digital printing process still uses CMYK and I wonder what, if any, swatches of color should I use to set my colors in Indesign.

    Should I just use a library without covering (the prints are going on Matt paper), or should I just mix them myself? It is not extremely important that I get a 100% color accuracy (it is a digital printer, after all).

    Thank you

    Skwurl wrote:

    Hey Rick,.

    I don't know yet what color space the printer uses. I have the impression that they use the CMYK toner. With respect to the PDF document, Yes, I will provide the PDF file myself.

    There is great debate on setup of swatch. I will explain the new mode that is more progressive...

    I don't know what you mean by Matt and uncoated. These are two different things. Find out which stock corresponds to your job. He has no sex and mast mast is a coated sheet but the coating is not bright.

    Select your color by choosing an ID number in the appropriate library (color mode), not coated solid or solid Matte. Once the color sample appears in the dialog box, change the mode in the laboratory and color type to deal with.

    Output PDF - if they want RGB output convert to destination, document RGB, include all profiles. There is another option, convert to destination (preserve numbers). If you export the document RGB, which makes no difference.

    Conversion CMYK-exit to destination, CMYK printers, include all profiles.

    There may be others who say you can create nuances differently. It's a recurring problem. The steps above are very brief explanations, and it can become more complicated. Don't forget laboratory samples are progressive. I can give you the more traditional approach if you wish.

  • change the fill color of button using action script.

    Hi guys... How to change the color of button using the action band. for example, I created a button, and the fill color for the button is green now. After I clicked on the button, I want the button to change the red color.

    If the text is a child of the button, it will be changed by this code.  to remedy this, you must use a background for your button and convert it to a movieclip (if you do this in the authoring environment).  Give it an instance name, as the bg.

    You can then apply the transform.colorTransform to yourButton.bg

  • Change the value of the radio button using Java Script

    Hi I have a radio button "Process_mode" with two 'ONLINE' and 'Offline' values.
    based on the selection criteria, I will call the process_mode() function and if the user presses the ok button I want to change the proces_mode offline.
    Here's my java script.
    but it does not change the value of the variable.
    Please suggest how to proceed.

    function process_mode()
    {
    confirm_msg = confirm ("your search criteria is complex.") It is proposed to submit the application in offline mode. do you want offline? ») ;
    If (confirm_msg is true)
    {
    $x('p2_process_mode').value = "out of the CONNECTION";
    $x('P2_HIDDEN_PROCESS_MODE').value = "offline";
    }
    }
    doSubmit ('BTN_FINAL_COUNT');
    Alert ("your application has been submitted. Please wait until the system processes your request.') ;

    Thanks and greetings

    Ashok Salimath

    Published by: user644340 on July 19, 2009 23:11

    Hey Ashok,

    A Radio element generates actually individual boxes within a radiogroup (this is done by giving the same "name" attribute to each key). Each button has its own attribute 'ID', which will be the name of the option page more "_n" - where n is a number from 0 (zero) - so the first button will be, say, "P1_RADIO_0", then the second will be "P1_RADIO_1" and so on.

    To set the value of the radiogroup and, therefore, article, you need to 'check' one of the buttons - this is done by setting its 'checked' true value. For example, if "Offline" is the second radio button to the P2_PROCESS_MODE element:

    $x('P2_PROCESS_MODE_1').checked = true;
    

    Andy

  • How to disable a button using Java Script in Apex

    Hi all

    I tried to disable a button when the value of an element of the selection in the same page list is zero. Here are the steps that I did.

    (1) created a new model of button like < table class = "t9StandardButton" id = "" #BUTTON_ID # "cellspacing ="0"cellpadding ="0"border ="0"Summary =" ">"
    2) has changed the model of existing button to the newly created button model.
    (3) added onchange = "javascript:fdisplay (this); "the selection list form element value
    (4) added the following in the page header java script

    < script type = "text/javascript" >
    function fdisplay (some) {}
    If {(some.value == 0)
    html_GetElement (' #BUTTON_ID # "") .disabled = true;
    }
    on the other
    {
    html_GetElement (' #BUTTON_ID # "") .disabled = false;
    }
    }
    < /script >




    But the script does not work. Is there something I'm missing here. Please advice.

    Thank you
    Vikas

    Vikas:

    In the field "attributes button" button type "id ="Ceboutonsélectionnel".

    Edit the button template to include the #BUTTON_ATTRIBUTES substitution string #. This should be put in the anchor tag in the template definition.
    Change your Javascript to reference the ID above as

    ....
    html_GetElement ('thisButton').disabled = true;
    ....
    

    CITY

  • color fill by using a script.

    I'm trying to create a script in CS5 mac os10.6.8 that will change the fill color of selected pathItems. I need a simple script that will change a selected pathItem 2,3,15,0 CMYK values. I have then select this script and to implement the action in a batch of 600 cases.

    I wish that this process could be saved as an action, but when I record the action "Add new nuance" I must manually enter the CMYK values, who will take an eternity for a lot more than 600 files.

    This works in CS6.

    var app.activeDocument = docRef;

    var col;

    neck of var = new CMYKColor();

    Col.cyan = 2;

    Col.Magenta = 3;

    Col.Yellow = 15;

    Col.Black = 0;

    Create the new shade using the color above

    Swatch var = docRef.swatches.add ();

    Swatch.Color = col;

    Swatch.Name = "col";

    Apply the nuance to a new path item

    var pathRef = docRef.pathItems [0];

    pathRef.filled = true;

    pathRef.fillColor = swatch.color;

Maybe you are looking for