How create a mixedcolor in javascritp

Below a segment of my scritp but there is an error in the assignment of colors
try{
myDocument.colors.item("doublecolor").name;
catch (myError){
   myDocument.mixedInks.add({name:"sbalzooro", model:ColorModel.MIXEDINKMODEL, space:ColorSpace.MIXEDINK,inkList:["Process Cyan","Process Magenta","sbalzo", "PANTONE 871 C"],inkPercentages:[0,0,100,100]});
thanks

Hi Davide,
MixedInks.add(…) expects the following arguments, in that order:
• inkList (array of Inks or MixedInkGroup)
• inkPercentages (Array of numbers)
• withProperties (Object w/ additional mixed ink props — optionnal)
Note that inkList, if supplied as an array, must contains actual existing (=valid) Ink specifiers (rather than ink names). So I suggest you implement a ink validator routine.
Here is a possible approach:
// Your settings
var MY_MIX_INKS = {
    // Valid ink names are required -- At least 2 process inks are required
    'Process Cyan'    :   0,      // Process1 : %
    'Process Magenta' :   0,      // Process2 : %
    'sbalzo'          : 100,      // Custom1  : %
    'PANTONE 871 C'   : 100       // Custom2  : %
    MY_MIX_NAME = 'doublecolor';
// Ink Validator
var validateInkData = function(/*{name: %}*/o, /*inks*/c, /*&inklist*/ll, /*&inkPerc*/pp)
    var k, t, z=0, r=1;
    ll.length = pp.length = 0;
    for( k in o )
        if( !o.hasOwnProperty(k) ) continue;
        if( !(t=c.itemByName(k)).isValid ){ r=0; break; }
        ll[z] = t.getElements()[0];
        pp[z++] = +o[k];
    return r;
// Main process
var doc = app.activeDocument,
    inkList,    // will receive validated ink list (array)
    inkPerc;    // corresponding percentages (array)
if( !doc.mixedInks.itemByName(MY_MIX_NAME).isValid )
    if( validateInkData(MY_MIX_INKS, doc.inks, inkList=[], inkPerc=[]) )
        doc.mixedInks.add(inkList, inkPerc,
            name: MY_MIX_NAME,
            model: ColorModel.MIXEDINKMODEL,
            space: ColorSpace.MIXEDINK
        alert( "The mixed ink '" + MY_MIX_NAME + "' has been successfully created." );
    else
        alert( "Unable to create mixed ink. Some inner inks are missing." );
else
    alert( "The mixed ink '" + MY_MIX_NAME + "' already exists." );
@+
Marc

Similar Messages

  • In RSA Authentication Manager 7.1, how create multiple security domains

    Hi,
    RSA Authentication Manager 7.1 in configured with LDAP(Sun java system directory server); how create multiple security domains 7.1, is this security domains is releted to LDAP?
    thanks

    I think what you need to do is create an identity sequence with RSA as the selection in
    Authentication and Attribute Retrieval Search List and AD in Additional Attribute Retrieval Search List. Then select this sequence as the result in the identity policy for the service

  • How create animation in oracle forms 6i

    any one can guide me how create animation in oracle forms 6i

    hello to every one..
    my dear friend developer is a busniness application tool.you can create
    animaiton on flash and other animaiton softwares and then you can call on froms.
    best regard
    amk

  • How create header with user id time date to VC-report's output as display ?

    How create header with user id time date to VC-report's output as display ?
    This info should come from the VC - not all the way from R3-side via FunctionModule/BABI. So only userid, date, time to output as normal text (which is not editable of course). Thanks =)

    Hi ann-mari
    Go through following link may it help u
    Form Item disabled based on portal role
    /people/community.user/blog/2007/01/17/visual-composer-explorations-using-portal-roles-to-influence-ui-element-behavior
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/usingrolestoinfluenceapplication&
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/vc/passingvaluesvia+URL&
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ad182ac7-0a01-0010-4fb8-8a4d217b19c1
    Best Regards
    ````Satish````

  • How create account document from Sales Document?

    Hi.
    I hope you are doing well. The scenario is:
    1.- Create Lead (Sucessfully)
    2.- Create Quotation wrt Lead ((Sucessfully)
    3.- Create Sales Order wrt Quotation (Sucessfully), into status tab I have add Transferred to bill. document status
    4.- The billing document was created sucessfully, however  The account document doesn't exist.
    How create account  document?
    Note:
    assign revenue account was configurated into spro
    What about BP , I guest , need to create a Billing organization.
    Regards.

    Resolved to doing transfer to billing action into status tab

  • How create indesign using Java Script

    I am new in indesign and want to create indesign application using JavaScript.
    When i use AppleScript to create Indesign Application i use this statement
    tell application "Adobe InDesign CS5.5"
    set myDocument to make document with properties
    end tell
    Indesign Application create sucessfully.
    How create Indesign Application using JavaScript ?
    or what is equivelent statement of ( tell application "Adobe InDesign CS5.5" ) in Java Script.
    There are some java scripting example given on forum or in sdk.These all example start with app.
    when I debug these java script using ExtendScript ToolKit 3.6 It give error on app (undefined app).I think this app ia application object.
    How create  indesign application object  app in javascript ?
    While this script run sucessfully when i put these script in C:\Program Files\Adobe\Adobe InDesign CS5.5\Scripts
    and to run these script use Scripts panel (choose Window > Utilities > Scripts), then double-click the script name in the Scripts panel in indesign application.But In this case first i start indesign application and then choose Window > Utilities > Scripts then double-click the script name in the Scripts panel.
    I want to create Indesign Application (instance) using JavaScript.When I run or (debug) my JavaScript in any javaScript tool like ExtendScript ToolKit 3.6 then Indesign application should start, like in Apple Script.
    Thanks

    Thanks Vamitul for reply
    For example when i run SelectObjects.jsx An InDesign CS5.5 JavaScript in ESTK  then message prompt "Target Adove Indesign CS5.5 is not running. Do you want to lanch." Then on click yes Indesign application start.
    I want to Know how indesign object "app" is created to start Indesign application on click yes.
    http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/cs55-docs/In DesignScripting/InDesign-ScriptingTutorial.pdf
    Like in VB to create indesign object we use CreateObject("InDesign.Application"). In javascript how create object say "app" of InDesign Application.
    For example if  i write
    var myDocument = app.documents.add();
    var myTextFrame = myDocument.pages.item(0).textFrames.add();
    myTextFrame.geometricBounds = ["6p", "6p", "24p", "24p"];
    myTextFrame.contents = "Hello World!";
    in a simple text file and save it with .js extention and to open this double click on this  it give error undefined "app".
    Source :Microsoft JScript runtime error
    So how define "app" or create indesign object ?
    Thanks

  • How create wireless on macbook pro to get internet in ather devices? thanks

    how create wireless on macbook pro to get internet in ather devices?  thanks

    Eriksimon wrote:
    Hi,
    Simply put(copy) the content of the UVIsoundbaks folder to where you want it. Then delete the original content. Make aliases of the content at its' new location, and move (copy) all those aliases back into the originating folders. Then delete the original aliases. That should do it.
    I'm confused about this.
    First, I put the content where I want. Got it.
    Then delete it?
    I don't have the room to put it where the application tells me to put it (not enough room on the HD), so I need to put the sample content on a external hard drive.
    Please advise.
    Thanks

  • How create new database and table in java db and how get java db backup

    hi master
    sir i use stuido creator
    sir please give me idea how i create new database
    and how create new table and view in this new database
    and how get this database backup
    how i give this databae backup to isp for deployment
    please give me idea with step
    thank
    aamir

    Create your own Value Object (Data Transfer Object) in Java with a structure similar to this and map the fields returned from the database to the fields of that object (preferably using SEtT methods).
    Hope this helps.

  • How create a replice "Mass Change for Quotation" from the "Mass..for order"

    Hello everybody,
    How create a replica "Mass Change for Quotation" UI object from the standard "Mass change for Sales Ordesr" UI object...
    Way: SAP CRM==>Select a business role "SPL-Service part Management" ==> Sales ==> "Mass Change Sales Orders"
    It needs a replica with the title "Mass Change for Quotation" .
    Could you pleas help?
    Mit freundlichen Gruessen / Kind regards,
    Pavel Biarozkin

    Hi Howard Brown,
    Thanks for your suggestions about Windows user experience. Actually, we are glad to hear more feedback
     about Windows operating system so that we can improve Windows to make it be more easier to
     use.
    As a suggestion for your current situation, you can use Windows Charm Bar to search Apps, it is also easy to use.
    Alex Zhao
    TechNet Community Support

  • How create and work with Z output to meet the client requirment?

    hi  gurus,
    I am SD functional consultant and need ur help
    Please explain me how create and work with Z output .
    How we arrange and change the fields in header and footer
    where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
    pls forward functional or Tech spec of Z output
    points will be rewarded
    thanx & regards
    shabnum

    Hi shabnum ,
    I hope you can do it.
    Goto SE71, enter form name--> click change
    1) click in page window command button, Identify the header and footer window
    2) single click on Header window and click change button(pencil symbol)
    3) identify the fields and change order of the fields
    I hope this will help to solve your issue
    Regards,
    SaiRam

  • How create the SMQ2 error through program ?

    Hi all,
    How create the SMQ2 error through program ?
    Any idea ... plsease share.
    Regards,
    Srikanth

    Hi juturusrikanth ,
    which one is the SMQ2 error?
    [FAQ's, intros and memorable discussions in the ABAP General Forum|FAQ's, intros and memorable discussions in the ABAP General Forum;
    [How to post code in SCN, and some things NOT to do...|How to post code in SCN, and some things NOT to do...;
    Regards
    Clemens

  • How create a DLL with module python?

    Hello,
    I am a beginner in TestStand,
    I would like to know, how create a DLL with module Python? because for create a sequence, we must own a DLL.
    Thank you for your answer
    Vincent
    Solved!
    Go to Solution.

    Hello,
    I would like use TestStand with Python module. So I believe, we must use a DLL for execute a test, I'm wrong because I can use .exe for realize a test.
    Now I know how use TestStand with Python module but I have a mistake. I wonder which is error 255?
    Whereas I use .exe in Language C, I have no error.
    Thank you for your anwser.
    Vincent
    Attachments:
    Setup_Test.jpg ‏244 KB
    Report.jpg ‏258 KB

  • How Create bookmark

    Hi
    can any one tell me how create bookmark using java script ?
    I want to create a bookmark on a Billjoy, there is a problem in parameter of  bookmarks.Add() function.
    INDESIGN::_Application oApplication;
    INDESIGN::Document objDoc;
    objDoc=oApplication.GetActiveDocument();
    INDESIGN::Pages pages= objDoc.GetPages();
    INDESIGN::Page  page =pages.GetItem(COleVariant((long)1));
    INDESIGN::TextFrames TextFrames =page.GetTextFrames();
    INDESIGN::TextFrame TextFrame = TextFrames.Add(covOptional,(long)1433299822,covOptional);
    TextFrame.SetContents(COleVariant(L"Billjoy"));
    // i want to create bookmark on billjoy
    INDESIGN::Bookmarks bookmarks = objDoc.GetBookmarks();
    bookmarks.Add(
    Parameters is destination of type  HyperlinkExternalPageDestination or HyperlinklPageDestination or
    HyperlinklTextDestination or Page.
    How use these type of parameter.
    Thanks.

    After creating a new folder ("plus" sign, or "Bookmarks" menu, then "Add Bookmark folder" or "shift-apple-N"), click on the parent folder (the one you want the new folder to go in as a subfolder). Then drag the new folder over to the right, where the bookmarks are listed.
    As an alternative, if you click on the parent folder on the left that you want a new folder to go in, then click into the area on the right (that lists the bookmarks in a folder), you can then "Add Bookmark folder" (again, "shift-apple-N") or use the "plus" sign on the bottom under the bookmarks.

  • How create and work with Z output to meet user req

    hi gurus,
    I am SD functional consultant and need ur help
    Please explain me how create and work with Z output .
    How we arrange and change the fields in header and footer
    where and how we do changes in Layouts setting and SAP scripts to meet the user requirments.
    pls forward functional or Tech spec of Z output
    points will be rewarded
    thanx & regards
    shabnum

    Hi
    From SPRO do the all steps.
    Goto SD-> BASIC functions->Output control->Output determination->Output determination by condition technique->Maintain Output determination for sales documents
    Here define all like access sequences, Output types, condition tables and assign them to Program and Forms.
    From SE71 copy the script to a Zscript and to modify it to suit your requirements and the same Zscript has to be assigned to Output type, Program in NACE transaction.
    Reward points if useful
    Regards
    Anji

  • How create/make website on mac 10.8.2

    how create website on mac 10.8.2

    Do a web search for web site creation software for the Mac.
    You'll have your answers.

Maybe you are looking for

  • Can't create a print queue on OS 10.7 via HP driver installed by Apple

    I've ust bought a reconditioned iMac and am getting applications up and running, but I'm unable to get my HP Laserjet 2200DN printer working. The Add Printer pane (Print & Scan Preferences) remains blank: Name & Location and Print Using & Add areas a

  • How does Business content work with BI 7 and R/3 4.6 as backend?

    Dear Bwers, We have BI 7.0 with source system as R/3 4.6. I have the following questions: 1. I want to know how to install new BI 7.0 datastructures from business content when the datasources from R/3 are in the old version? 2. Is Business Content up

  • External Hard Drive "You don't have permission" intermittent issue

    Hi - We have three iMacs that are networked using Airport Extreme.  Computer 'A' has an external USB hard drive plugged in to it.  I have "file sharing" turned on, and using "get info", I have shared the external hard drive with Computer 'B' and Comp

  • How do I put the songs on my iPod onto my iTunes

    I put iTunes onto my laptop and want to put my songs from my iPod onto my iTunes, how do I do this or do I have to rip my cds again to put the songs onto iTunes?

  • Restore 8GB iPod Touch

    My original computer has crashed and I have forgotten what my 4 digit code is, how do I restore my 8GB iPod touch back to factory settings so I can start all over? Any help is greatly appreciated!