Automation plugin: how to select a spot channel when 2 channels have the same name?

I have a CMYK document opened in photoshop. In "CHANNELS" panel, I just added 2 spot colors with the same name "Sport Color 1".
As I click any of the spot channel to select it, the "Listener" plugin will output some c++ code like below:
SPErr PlayeventSelect(/*your parameters go here*/void)
     PIActionDescriptor result = NULL;
     DescriptorTypeID runtimeKeyID;
     DescriptorTypeID runtimeTypeID;
     DescriptorTypeID runtimeObjID;
     DescriptorTypeID runtimeEnumID;
     DescriptorTypeID runtimeClassID;
     DescriptorTypeID runtimePropID;
     DescriptorTypeID runtimeUnitID;
     SPErr error = kSPNoError;
     // Move this to the top of the routine!
     PIActionDescriptor desc0000000000003980 = NULL;
     error = sPSActionDescriptor->Make(&desc0000000000003980);
     if (error) goto returnError;
          // Move this to the top of the routine!
          PIActionReference ref0000000000001A48 = NULL;
          error = sPSActionReference->Make(&ref0000000000001A48);
          if (error) goto returnError;
          error = sPSActionReference->PutName(ref0000000000001A48, classChannel, "Spot Color 1");
          if (error) goto returnError;
     error = sPSActionDescriptor->PutReference(desc0000000000003980, keyNull, ref0000000000001A48);
     if (error) goto returnError;
     error = sPSActionControl->Play(&result, eventSelect, desc0000000000003980, plugInDialogSilent);
     if (error) goto returnError;
returnError:
     if (result != NULL) sPSActionDescriptor->Free(result);
     if (desc0000000000003980 != NULL) sPSActionDescriptor->Free(desc0000000000003980);
     if (ref0000000000001A48 != NULL) sPSActionReference->Free(ref0000000000001A48);
     return error;
You can see "PutName" add the channel name "Spot Color 1" to reference, and I think it will not work correctly if I add such code to my project since PS cannot differentiate the 2 channels only by name. Can anyone tell me if there's any other method for selecting spot channel? Thanks in advance.

Hi
Here is the something from docs tht you may find usefull.
Tryusing index instead of name:
SPAPI OSErr(*
PutIndex )(PIActionReference ref, DescriptorClassIDdesiredClass, uint32 value)
Puts an index into a reference (formIndex) along with the desired class for the reference.
Unfortunately I dont have C++ here to try i just used definition from docs.
Hope that this help.
Regards,
Momir Zecevic
Ars Media
www.arsmedia.tv

Similar Messages

  • Spot colors Black, All have the same alternate color values

    If printer’s mark [Crop, Registration, Page] is enable in the InDesign preset options, we are getting “Spot colors Black, All have the same alternate color values” error in the PITSTOP log report.

    Rob, here's screenshot of Acrobats Output Preview Object Inspector. You can download my PDF here - //www.fileswap.com/dl/Q1CzzOzEqt/
    I'm not sure if CM was assigned to document when created or  afterwards. In Color Settings preferences is stated Fogra 39 (if it matters - document was meanwhile saved and opened...). Are there other options to assign workspace to exsisting document?
    Peter, this is not the case. Placed image has embeded same color profile as is working space of document in ID. I tried the same with sRGB image placed in same ID document and compared it to PS but color shift (greenish) is present - it looks exactly the same.
    Guys, I can't tell you how happy I am to have you help me with this terrible and nerve-wracking problem.

  • I recently purchase an ipad2.  I also have a mac laptop.  Now, when I facetime call using my iphone to my ipad2 or mac, it states busy.  how can i fix this problem?  I have the same apple id e mail for both ipad2 and mac.  it might be getting confuse now.

    I recently purchase an ipad2.  I also have a mac laptop.  Now, when I facetime call using my iphone to my ipad2 or mac, it states busy.  how can i fix this problem?  I have the same apple id e mail for both ipad2 and mac.  it might be getting confuse now.  I want to be able to face time also using my ipad2 to my laptop especially if one of the members of the family is traveling.  Thanks.

    thanks.  your answer was correct, clearer.  I have another question, maybe you can answer.  I just purchase my ipad2 2 days ago.  yesterday, there was a sound.  today there is no sound.  there is a sound only in movies and you tube and music.  but no sound on all apps and keyboards.  I look it up and seems like ther are few that have this problem.  I called walmart coz I bought it there and they told me that they have not heard that before but if I can't fix it, just return it and exchange it with anew one since I have 14 days to do that.  I tried rebooting it and still won't work.  Should I just restore it?

  • HT201493 How can I add my daughter to Find my friends when we have the same itunes account and that's how they make us log in?

    How can I add my daughter to Find my friends when we have the same itunes account and that's how they make us log in?

    1) You asked "Does she need to reconnect to that itunes/computer and if so what do we need to do to remove this folder of pics from her ipod?" Yes, you have to connect the iPod to that computer and go to the Photos pane for the iPod in iTunes and uncheck sync photos and the click on synce/apply. In the future do not check sync photos.
    iOS and iPod: Syncing photos using iTunes
    2)
    Create a NEW account for using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Then on the iPod go to
    - Settings>Messages>Send and receive and sign out your ID and sign into hers. Make sure that only her ID email address is listed.
    - Settings>FaceTime sign out of your ID and sign into hers. Make sure that under You can be reached at only her ID email address is listed
    - Settings>iCloud and sign out and sign in with hers
    Contnue to use the commpn ID/account for Settings>iTunes and App stores.

  • How to create a user  y which will have the same content of existing user x

    how to create a user y which will have the same content of existing user x ,
    like all the tables,procedures,functions and packages

    You can do the following.
    1. Use CREATE USER to create the new account/schema
    2. Use exp to export old schema
    3 Use imp with fromuser=<old user> and touser=<newuser>

  • How to import images that have the same name as images already imported

    I am trying to import images into LR3.  I have a number of images with duplicate names.  Some of them are duplicate images that I simply have stored in different directories and some are images that are not duplicates but have the same name.  LR3 refuses to import any images that has the name of an image that has already been imported.  Is there anything I can do about this.  If not, it kind of makes the softwares useless to me.
    In hopes of a solution . . .
    --Kenoli

    Thanks.  I'm sure making sure all file names are discrete makes sense.  I guess I need to find some kind of bulk re-name utility. 
    Additionally, I am dealing with a very large set of unorganized images and one of the uses I would like to put LR3 to is to organize the images into directories and get rid of duplicates while inspecting them to make sure that I don't trash differing images with the same names.  One of the challenges is identifying these images so I can re-name them.
    I have been working with Apple's Aperture, which doesn't rely simply on the name to identify images since it uses a more complicated algorithm to differentiate images from each other.  It is one thing I really like about Aperture.  What I like about LR3 is that it lets me use actually file directories to store images rather than moving them into its own file system like Aperture does.  I don't like having files locked into a system that is software dependent.
    Also, I finally found the checkbox that tells LR to import "duplicates."  I couldn't find it before.  I don't find LR3 as intuitive as I'd like.  I've always had to spend more time figuring out how Adobe software does things than I would like. I've had little luck with Adobe's support site, aside from this forum.
    Thanks for you helpful suggestions.
    --Kenoli

  • How do I get itunes and iphoto to have the same files on multiple users?

    Every time I upload a disc or photos, they show up on my user profile, but not my wife's. It seems like I am wasting a ton of hard drive space reloading the same things between each user. I tried the "shared" folder, but i am not sure that worked.
    Thanks for the help...

    I don't think that Thomas's solution will work on 10.5.
    There are two ways to share, depending on what you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc. then:
    Quit iPhoto in both accounts
    Move the iPhoto Library Folder to an external HD set to ignore permissions. You could also use a dmg.
    In each account in turn: Hold down the option (or alt) key and launch iPhoto. From the resulting dialogue, select 'Choose Library' and navigate to the new library location. From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.
    Regards
    TD

  • How to add a new user so it have the same access with restricted usertime

    When i made a new useraccount to my daughter,with restricted usertime,she have probl.to get into the interned.
    How can i make it possible to have the same look on her useraccount as mine as admin.but only with restricted usertime?
    Brgds
    O.Knutsen

    Hi,
    This should be very much possible.
    Please see:
    https://glassfish.dev.java.net/nonav/javaee5/amx/javadoc/index.html
    Once you've got the domain-root, you should traverse and get a named "config",
    using getConfigConfigMap("server-config") method and then get the
    SecurityConfig out of that. Once you get the Security Config, you should get
    the default realm using getDefaultRealm method and then it should be
    possible for you to use addUser.
    Please let me know if it helps.
    Kedar

  • Iphoto seems to be deleting old (several years old) images that hav the same name as new images being loaded. how can i fix this?

    I was browsing some old photos in iPhoto11 and started getting 'image not found' errors. After much investigation, rebuilding thumbnails and extracting photos using fatface iphoto library manager it seems that newer photos with the same name as very old photos (Canon camera naming scheme IMG_nnnn.jpg) have caused the old photos to be deleted? I thought iphoto handled this situation but it seems not.
    I never got any error or warning messages on importing the newer photos. Naturally the old ones have been in there for years and were originally imported using older versions of iphoto.
    As it happens I do have all these old photos stored elsewhere so its not a case of panicking but I could do with a solution going forwards.
    Has anyone else encountered this (and of course if so how did you resolve it?)
    TIA
    Paul

    Every new import to iPhoto goes into a new folder on the HD, so no, iPhoto doesn't overwrite older images with the same filename.
    Are you running a Managed or a Referenced Library?
    A Managed Library, is the default setting, and iPhoto copies files into the iPhoto Library when Importing. The files are then stored in the Library package
    A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. (You unchecked the option to copy files into the Library on import) The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management. 

  • I would like to know how to selectively merge bookmarks on two machines on the same network please

    Over time, my desktop and notebook computer bookmarks have diverged. I would like to be able to merge them so they are both the same again, choosing entries from each machine as appropriate. With IE I used to use a directory/file comparison tool, but I undertand FF uses a database and haven't found out how to do it.
    Rgds, Andy

    See [[What is Firefox Sync]] and [[How to sync Firefox settings between computers ]]

  • How do I deauthorize a computer, when it's the same computer?

    Everytime I've reinstalled Windows, iTunes makes me re-authorize the computer, taking up my 5 devices. I was told I can't deauthorize without access to the computer, but it's the same computer I'm using now. How do I get my computer deauthorized?

    go in to itunes then go to the itunes store once loaded click store in the menu then deauthorise this PC and it will deauthorise it for you

  • How do you I get my iPad to have the same cell phone as my phone?

    Under FaceTime and IMessage  where it said to be reached at I want my cell phone number there how do I change number?

    You can't change the mobile number associated with your iPad to the same as your iPhone. However, if you update to iOS 6, you can associate your iPhone's mobile number with your Apple ID which will allow you to send and receive iMessages on your iPhone, iPad and Mac running Mountain Lion with your iPhone's mobile number.

  • I've had a pc fire and need to download old programs. How do I download Photoshop 8 when I have the serial number?

    I've had a fire in my pc and the hard drives are damaged having to reinstall programs, such as Adobe Photoshop 8. Have the serial but need advice on how to use it to reinstall the program.

    Do you have your original install dvd for pse 8 or was it a download from adobe?
    You can download the windows version of photoshop elements 8 from here:
    Download Photoshop Elements products | 9, 8, 7

  • I have trouble adding attachments to my emails in my yahoo-account - how do I fix this ? When I try the same files on a PC it does work...

    Since a few days I am no longer able to attach certain files (ppt, pdf, jpeg) in my emails on my yahoo-account.  I click the attach button, go to my file and select it - and then the signal keeps running and running, and the file doesn't attach.  Sometines I get an error message, but not always.  The files are not very big ones (3 or 4 MB) - well below the 25 MB that is the maximum.  Some files do attach - I cannot figure out why the others don't.
    When I use my husband's PC, I can attach the "problematic" files without any trouble. When I work with gmail on my Mac, again no problem.
    I tried the help desk of yahoo, but they could not solve my problem up til now.  Is this a Mac problem, or a yahoo-problem ? I don't know where to look for a solution, but at this point I am pretty desparate because I cannot work without both !
    Has anyone a suggestion what I can do about this ?
    Thx !!!!

    Are there any dialog boxes popping up behind your Yahoo screen?
    I have intermittent problems attaching files in Yahoo mail and this is usually the reason.  I'm also using an iMac (10.7.3) and this is likely the problem.
    It is generally a Yahoo issue rather than a Mac problem.

  • How do I delete images in Finder's "all my Files" when I have the same pictures in a file in Documents? It seems like a lot of duplication. If I delete the individual image it disappears in the folder. Thank You.

    How do I delete images in Finder's "all my files" without deleting the images in a separate folder I have in Documents? It seems to be so much duplication. Just set up our new Mac and am not understanding how the files work. Thank you.

    All My files is a "search folder"
    it isn't real storage location. All files within your home folder are found by the criteria set for the search folder and displayed to you In one place.
    If the folder doesn't meet your needs, remove it from the sidebar.

Maybe you are looking for

  • Returning Yoga 3 14

    well, too many things have been happening that i finally decided to return my yoga for a replacement before my 30 days was up. kept hoping the glitches would be just random occurances, but it's looking more like the unit is a lemon, or at least I hop

  • Lock objects to text

    Does anyone know of a way to lock floating objects to text in a Pages09 document? I love the way Pages deals with floating objects, so much better than Word, but I'd like to be able to lock individual or grouped objects (images, text boxes) to a spec

  • ESS W4 application - picking up state from Emergency address

    Hello, The W-4 application in ESS is picking up emergency address of an employee and giving an option to create an IT0210 record for that state also (if the state is different from the work state of the employee). However, this is not desired and eme

  • Function to return a list of sub-class elements

    Hi all I'm trying to write a function using templates which takes a list and returns a sub list of a given type.something like shown below: static <E, T> List<E> get_specific_elements(Collection<T> elements) { //assumes E extends T           List<E>

  • Java.io.NotSerializableException: paint.Main$1

    hi everybody this is my problem... i have this code: public class Main extends JFrame class figura implements Serializable Point x, y; int tipo; int rettipo(){ return tipo;} public Point retx(){ return x;} public Point rety(){ return y;} void ponerti