Load Transparency from a layer?

How can I load the transparency from a given layer as a selection via script? In the way as if you cmd-klick on a layer palette icon and have the solid pixels in that layer selected.
There is the Selection.load (from: Channel ), and in the Photoshop menue there is also the option to select the Transparency of the active channel but I can't find anything like that in the object Library.
Thanks for your help, Joerg

You can not use a scripting API reference when working with action manager API. You could add by index, but the action manager index for a layer is not the same as the scripting layer index.
If your workflow allows you could make the layer you want to add active, get the action manager index, add by that index and restore the active layer.
function addLayerTransToSelection( layerIndex ){
     try{
          var desc = new ActionDescriptor();
               var ref = new ActionReference();
               ref.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Trsp" ) );
               ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
               ref.putIndex(charIDToTypeID( "Lyr " ), layerIndex );
               //ref.putName( charIDToTypeID( "Lyr " ), layerName );
          desc.putReference( charIDToTypeID( "null" ), ref );
               var ref1 = new ActionReference();
               ref1.putProperty( charIDToTypeID( "Chnl" ), charIDToTypeID( "fsel" ) );
          desc.putReference( charIDToTypeID( "T   " ), ref1 );
          executeAction( charIDToTypeID( "Add " ), desc, DialogModes.NO );
          return true;
     }catch(e){alert(e);}
     return false;
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("Lyr "), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") );
var index = executeActionGet(ref).getInteger( stringIDToTypeID( 'itemIndex' ) );
addLayerTransToSelection( index );

Similar Messages

  • AppleScript - Get links from one layer

    I need to make a list of linked files from one InDesign layer only but can't figure out how.
    This is my base that works just fine but gives me a list of all linked files in my document.
    set layFilesLinksList to every link of document 1
    I have tried this
    set linksList to every link of document 1 whose active layer is "Images"
    set linksList to every link of layer "Images" of document 1
    Any other suggestions?

    Thanks!
    We are a bit on the way, if i run your script as stand alone i get one of many images in the layer "Images"
    But when implementing this code in my bigger script i get nothing.
    This works as before, i get every link in my document.
    on createMiniature()
      tell application "Adobe InDesign CS5"
      set user interaction level of script preferences to never interact
      activate
      set myLinks to every link of document 1
      -- Images from one layer only workaround --
      tell active document
      if exists layer "Images" then set layerImages to layer "Images"
      set grphicBoxs to all graphics of layerImages
      set myLinks to {}
      repeat with i in grphicBoxs
      set iLink to item link of i
      set pathLink to file path of iLink
      set end of myLinks to pathLink
      end repeat
      return myLinks
      end tell
      -- End Images from one layer only workaround --
      repeat with thisFile in myLinks
      set ruler origin of view preferences of document 1 to spread origin
      set zero point of document 1 to {0, 0}
      set zeroX to 0
      set zeroY to ((page height of document preferences of document 1) + 5)
      set pageHeight to ((page height of document preferences of document 1))
      set pageWidth to ((page width of document preferences of document 1))
      set maxHeight to 13
      set theScale to maxHeight / pageHeight
      set imageXPos to ((item 2 of geometric bounds of parent of parent of thisFile))
      set imageYPos to ((item 1 of geometric bounds of parent of parent of thisFile))
      set imageXPos2 to ((item 4 of geometric bounds of parent of parent of thisFile))
      set imageYPos2 to ((item 3 of geometric bounds of parent of parent of thisFile))
      set imageWidth to imageXPos2 - imageXPos
      set imageHeight to imageYPos2 - imageYPos
      set theName to name of thisFile
      set filePath to ((file path of thisFile))
      set theImgPath to quoted form of POSIX path of filePath
      set imageStatus to ""
      set imageStatus to do shell script ("/usr/bin/exiftool -xmp:Instructions -b " & theImgPath)
      if imageStatus = "" then
      set imageStatus to "Paper"
      end if
      set newBox to (make new rectangle of document 1 with properties {geometric bounds:{zeroY + imageYPos * theScale, zeroX + imageXPos * theScale, (zeroY + (imageYPos + imageHeight) * theScale), zeroX + (imageXPos + imageWidth) * theScale}, stroke weight:0.2, stroke color:"Black", fill color:imageStatus, active layer:StatusLayer})
      set opacity of blending settings of fill transparency settings of newBox to 60
      end repeat
      set the properties of layer StatusLayer of document 1 to {visible:false}
      end tell
    end createMiniature
    Changing the script to this gives me a blank result with no images
    on createMiniature()
      tell application "Adobe InDesign CS5"
      set user interaction level of script preferences to never interact
      --activate
      --set myLinks to every link of document 1
      -- Images from one layer only workaround --
      tell active document
      if exists layer "Images" then set layerImages to layer "Images"
      set grphicBoxs to all graphics of layerImages
      set myLinks to {}
      repeat with i in grphicBoxs
      set iLink to item link of i
      set pathLink to file path of iLink
      set end of myLinks to pathLink
      end repeat
      return myLinks
      end tell
      -- End Images from one layer only workaround --
      repeat with thisFile in myLinks
      set ruler origin of view preferences of document 1 to spread origin
      set zero point of document 1 to {0, 0}
      set zeroX to 0
      set zeroY to ((page height of document preferences of document 1) + 5)
      set pageHeight to ((page height of document preferences of document 1))
      set pageWidth to ((page width of document preferences of document 1))
      set maxHeight to 13
      set theScale to maxHeight / pageHeight
      set imageXPos to ((item 2 of geometric bounds of parent of parent of thisFile))
      set imageYPos to ((item 1 of geometric bounds of parent of parent of thisFile))
      set imageXPos2 to ((item 4 of geometric bounds of parent of parent of thisFile))
      set imageYPos2 to ((item 3 of geometric bounds of parent of parent of thisFile))
      set imageWidth to imageXPos2 - imageXPos
      set imageHeight to imageYPos2 - imageYPos
      set theName to name of thisFile
      set filePath to ((file path of thisFile))
      set theImgPath to quoted form of POSIX path of filePath
      set imageStatus to ""
      set imageStatus to do shell script ("/usr/bin/exiftool -xmp:Instructions -b " & theImgPath)
      if imageStatus = "" then
      set imageStatus to "Paper"
      end if
      set newBox to (make new rectangle of document 1 with properties {geometric bounds:{zeroY + imageYPos * theScale, zeroX + imageXPos * theScale, (zeroY + (imageYPos + imageHeight) * theScale), zeroX + (imageXPos + imageWidth) * theScale}, stroke weight:0.2, stroke color:"Black", fill color:imageStatus, active layer:StatusLayer})
      set opacity of blending settings of fill transparency settings of newBox to 60
      end repeat
      set the properties of layer StatusLayer of document 1 to {visible:false}
      end tell
    end createMiniature

  • Movie refuses to load variables from text file

    Hi,
    I'm sure you can solve my newbie problem in less than 1
    minute...
    I'm pulling my hair out on a template I bought 2 days ago
    from templatemonster.com
    I am using Flash 8 Pro.
    All I want to do is change an existing textfield that is
    Static to Dynamic and load variables from a text file.
    The Action Script I use to do so comes directly from
    Macromedia documentation (see attached)
    It works fine when I create a brand new movie, but doesn't do
    anything when inserted into the template.
    It doesn't even complain about not finding the text file if I
    rename or delete it!
    Here are the FLA and text file:
    Edit : Link to source file removed
    The textfield I would like to change is in the txt2 symbol.
    Here is how I proceed:
    When I open HEADER.FLA, Flash tells me I'm missing a font,
    ok, so I click on Use Default, I'll deal with this later.
    I open up the Movie Explorer, go to Layer 30, go to Frame 75
    and click once on txt2
    I name the instance "myMovie_mc" and save (converts from
    Flash MX to Flash 8)
    I double-click on the Movie Clip, select the word
    "Automobile" on the Stage, change from Static to Dynamic and call
    that instance "myText_txt"
    Still in the Movie Clip, I create a new layer I call
    "actions", and in Frame 1 I copy the attached Action Script:
    This script works when I create a new flash file, but it does
    absolutely nothing in this template.
    I know I'm doing something wrong, but I wonder what?
    Many thanks to any helping soul!
    Ferris.

    try this:
    // Load text as variable and assign it to the
    // dynamic text field
    var features_lv:LoadVars = new LoadVars();
    features_lv.onLoad = onText();
    features_lv.load("safetyFeatures.txt");
    function onText(success:Boolean) {
    if (success) {
    myText_txt.text = features_lv.safetyfeatures;
    } else {
    myText_txt.text = "unable to load text file.";
    or this
    // Load text as variable and assign it to the
    // dynamic text field
    var features_lv:LoadVars = new LoadVars();
    features_lv.onLoad = function(success) {
    if (success) {
    myText_txt.text = features_lv.safetyfeatures;
    } else {
    myText_txt.text = "unable to load text file.";
    features_lv.load("safetyFeatures.txt");

  • Transparent Deployment Using Layer 4 Switch

    Hi,
    Just want to ask how to deploy WSA Ironport on transparent mode on layer 4 Switch.
    I believe it is just deployed by choosing Layer 4 on Transparent Redirection on WSA Ironport.
    But the question is, what will I need to configure to my Layer 4 switch for it to redirect traffic to WSA?
    I'm trying to connect it to a hp procurve layer 4 switch to use transparent redirection.
    Can someone clarify how to deploy it?
    Thanks

    Make sure your swtich can do it:
    http://h30499.www3.hp.com/t5/Switches-Hubs-Modems-Legacy-ITRC/HP-Procurve-2626-Policy-based-routing/td-p/5421071
    I did some digging and didn't find any decent docs on setting it up... but if you take your drawing from the L4TM question you posted, you want to set up a policy that for the "security vlan" so that all IP traffic on the web ports you want to monitor (80, 443, plus others you might want) gets sent to the IP of the WSAProxy
    Here's a bit I lifted from a post on HP's site:
    http://bizsupport2.austin.hp.com/bc/docs/support/S​upportManual/c03015541/c03015541.pdf
    You'll want to have a look through Chapter 8 for the configuration. You've got to basically configure a traffic class, configure policies for it, and then apply it (in this case) to each of the VLANs you want it for.
    What kind of firewall are you using?  If its a Cisco ASA, it would actually be simpler to do WCCP to the WSA...

  • Data loading issue from BW Production to BW Sandbox

    Hello Guys,
           I am trying to load data from one info cube (Production) to another info cube (Sendbox) applying update rules for prototype model. I am not getting any error in monitoring window for Info Package. But what I see is '0 from 0 records' for long time. I have tested connection between two systems that looks O.K. There is data in Production Cube. This is first time I am loading data between two BW systems. I am not sure what could be wrong. Can some one please help me ASAP? Thanks a lot.
                 Export data source for that cube in production is created.
    Kate

    Hi Kate,
    The first thing you might want to check is the status of the extractor job in your Production system. The job name will be same as the request name BI_REQU*. So, in SM37 of Production system check for the extractor job <request number>  and check the status of the job. If it is running, it means that ur extraction is running still and you can wait for some more time or monitor the job closely in SM50 regarding it's progress.
    If it is in cancelled state, you need to check the job log or any short dumps for the error message.
    Regards,
    Sree

  • Unable to load data from an ODS to a Cube

    Hi all,
    I am traying to load data from an ODS to a cube, and I'm getting the following msg at the bottom of the screen monitor: <b>"No corresponding requests were found for request REQU_BZUH9ZPYNL5XLQNB7K8IQDKFS in the ODS/Cube" Message no. RSBM043.</b>
    I am unable to load the data. The QM status is yellow. When the process starts, on the left hand of the monitor it shows: "0 of 84408 records" which is ok. I load that with this package before and it works well.
    Can you help me what I have to do? I tried to wait but it was the same: no progress and no data in the cube.
    Thank you very much and kind regards,
    MM.
    May be this helps...
    When I look at the status, it says that I have a short dump at BW. It was CALL_FUNCTION_REMOTE_ERROR and the short text is "The function module "SUBST_TRANSFER_UPGEVAL" cannot be used for 'remote'". This short dump occurs very much before I shoot the upload.
    Thanks again.

    Hello MM,
    Can you do the following..
    make the Total status Red Delete the request from cube.
    goto ODS -> Remove the Data Mart Status -> Try loading it again.
    The error message that you get is common when we are trying to run a infopackage with the source object having no new request, (means all the requests available in the source are already moved to the targets). So please try the steps given above.
    Hope it will help!

  • How do I use "Trim Paths" after "Create Shapes from Vector Layer" on a strokes only layer?

    Hello,
    Adobe After Effects CC
    2014.0.2
    Version 13.0.2.3
    I have imported an illustrator file that was created in Illustrator CC 18.0.0. The file contains the outline of a logo. It is the logo with the fill set to none and the stroke set to 1px.
    I drag the logo_strokes.ai file onto the composition, right click, and click Create Shapes from Vector Layer.
    A new layer is created and in the Contents "drop down", a Fill 1 layer is created.
    When I select the Contents "drop down" and click Add / Trim Paths, a Trim Paths 1 layer is created.
    When I animate Trim Paths 1, it appears to animate the Fill layer, not the stroke.
    How do I get it to animate just the stroke, and not show a fill at all?
    Thank you.

    Thanks,
    I am reading and watching tutorials. Still stuck on that one point.
    Here are the images of the After Effects layers. The illustrator layer is the top layer.

  • To load data from a cube in SCM(APO) system to a cube in BI system.

    Experts,
         Please let me know whether it is possible to load data from a cube in SCM(APO) system to a cube in BI system.If so explain the steps to perform.
    Thanks,
    Meera

    Hi,
    Think in this way,
    To load the data fro any source we need datasource Ok. You can genare Export data source for Cube in APO,  then use that datasource for BW extraction, try like this. I think it will work, in my case I'm directly loading data from APO to BW using the DataSource sthat are genaraed on Planning Area.
    Why you need to take data from APO cube?. Is there any condition for that?. If it is not mandatory, you can use the dame datasource and load the data to BW, if they have any conditions while loading the data from APO to APO cube, they you try check wherther it is possible in BW or not. If possible then you use DataSource and do the same calculation in BW directly.
    Thanks
    Reddy

  • ERROR :  "Exceptions in Substep: Rules" while loading data from DSO to CUBE

    Hi All,
    I have a scenario like this.
    I was loading data from ODS to cube daily. everything was working fine till 2  days before. i added some characteristic fields in my cube while i didn't do any change in my key figures. now i started reloading of data from ODS to cubes. i got the following error  "Exceptions in Substep: Rules" after some package of data loaded successfully.
    I deleted the added fields from the infocube and then i tried toreload data again but i am facing the same error again  "Exceptions in Substep: Rules".
    Can any one tell me how to come out from this situation ?
    Regards,
    Komik Shah

    Dear,
    Check some related SDN posts:
    zDSo Loading Problem
    Re: Regarding Data load in cube
    Re: Regarding Data load in cube
    Re: Error : Exceptions in Substep: Rules
    Regards,
    Syed Hussain.

  • Unable to load data from DSO to Cube

    Good morning all,
    I was trying to load data from DSO to Cube for validation. Before loading the new data, I deleted all from DSO and Cube. They contain no request at all. Cube has "Delta Update". First DSO was loaded 138,300 records successfully. Then Activated the DSO. The last when I clicked Exectue (DSO --> Cube), it loaded 0 record. I was able to load the data yesterday. What might be the reasons for this situation?
    Thank you so much!

    Hi BI User,
    For loading delta upload into the data target, there should be an initialization request in the data target with same selection criteria.
    So..first do the initialization and perform delta upload into the cube.
    Regards,
    Subhashini.

  • DTP load data from DSO to CUBE can't debug

    Hi,all expert.
    I met a problem yestoday.
    When I load data from datasource to DSO,and debug the start routine,it was ok.But when I load data from DSO to CUBE,and debug the routine,it got an error like this:
    inconsistent input parameter(parameter:<unknow>,value <unknown>)
    message no: RS_EXCEPTION 101.
    I don't know why,PLZ help me,thank you very much.

    Hi,
    An alternative way to do this is to have a small code for infinite loop in your start routine. And when you start the load goto SM50 and debug the process which is executing the load, from there you can close the infinite loop and carry on with the debugging. Please let me know if you require further information.
    Thanks,
    Arminder

  • Error when loading data from DSO to Cube

    Hi,
    After upgrading to 2004s we get the following error message when trying to load data from a DSO to a Cube:
    Unexpected error: RSDRC_CONVERT_RANGES_TO_SELDR
    Has anyone experienced a similar problem or have some guidelines on how to resolve it?
    Kind regards,
    Fredrik

    Hej Martin,
    Tack!
    Problem solved
    //Fredrik

  • Dump when loading Data from DSO to Cube

    Hi,
    i get a short dump DBIF_REPO_PART_NOT_FOUND when trying to load data from a dso to a cube. From DSO to DSO it works fine.
    any idea`s?
    thx!
    Dominik

    the Dump occurs in the last step of the last data pakage in the DTP Monitor.
    I checked the OSS note, but i don´t know how to check the kernel version.
    Now i used another DSO for testing and i got another Dump with a different name.
    After that i logged in again and it works with my test DSO data...
    But still not working with the original one...
    @Kazmi: What detaisl u mean exactly?

  • Issue while loading data from DSO to Cube

    Gurus,
    I'm facing a typical problem while loading Cube from a DSO. The load is based upon certain conditions.
    Though the data in DSO satisfies those condition, but the Cube is still not being loaded.
    All the loads are managed through Process Chains.
    Would there be any reason in specific/particular for this type of problem?
    Any pointers would be of greatest help !
    Regards,
    Yaseen & Soujanya

    Yaseen & Soujanya,
    It is very hard to guess the problem with the amount of information you have provided.
    - What do you mean by cube is not being loaded? No records are extracted from DSO? Is the load completing with 0 records?
    - How is data loaded from DSO to InfoCube? Full? Are you first loading to PSA or not?
    - Is there data already in the InfoCube?
    - Is there change log data for DSO or did someone delete all the PSA data?
    Sincere there are so many reasons for the behavior you are witnessing, your best option is to approach your resident expert.
    Good luck.
    Sudhi Karkada
    <a href="http://main.nationalmssociety.org/site/TR/Bike/TXHBikeEvents?px=5888378&pg=personal&fr_id=10222">Biking for MS Relief</a>

  • Before my PC had iTunes, I loaded Aps from store onto my daughter's PC with iPad connected. I indicated my email address and Apple password. Now I want to upgrade to next iPad but Aps in my iPad are not on my PC iTunes. Do I have to buy again to keep them

    I'm a new user of an iPad. Before my PC had iTunes (it does now), I loaded Aps from from the iStore using my daughter's PC with my iPad cable-connected. I indicated my email address and Apple password--not hers and paid for these Aps--receipts arrived via my email. Now I want to upgrade to 5.1 but the Aps now loaded on my iPad do not show up  on my PC iTunes library. When I click 'Upgrade' I get a warning message that says all Aps currently on the iPad will be obliterated in the process which of course I don't want to have happen because they're not showing up on my PC which presumably means my PC is not aware of what's on my iPad. Do I have to buy these same Aps again to keep them if I'm going to upgrade to 5.1, and how do I get my iTunes on my PC to back up the Aps currently loaded onto my iPad?

    You should be able to copy the apps (and any other iTunes purchases) over to your computer's iTunes via File > Transfer Purchases. And as long as apps remain available in the store, and you use the same iTunes account as you originally used to purchase them, you should be able to re-download them in the future : http://support.apple.com/kb/HT2519
    If you are already on iOS 5+ on your iPad then you should be able to update the iPad directly on the iPad via Settings > General > Software Update .

Maybe you are looking for

  • Showing documents from third party DMS

    Hi All, We have a requirement where we want to show the documents in EP from a third party DMS. Can anyone guide how to proceed on that? Regards, Piyush

  • Problem reading from file

    Hi, im bit new to java and i am having this problem. I have a Hashtable of 42000 keys and each value points to an object (vector of arrays). I am storing this hashtable to a file using ObjectOutputStream. the file size is 25 mb. no problem till this

  • How to set the character set to default

    Hi All, How to set the character set default to Simplified Chinese(GB2312), current we need change it every time. Thanks in advance.

  • ADE error: "Document is licensed for a different user account"

    My ADE worked great for months. All of a sudden it will not let me add books to it's library. When I try to add a book (Epub w/DRM) it tells me "Document is licensed for a different user account." What changed? What is my problem?

  • Is there such a thing as Lighting to HDMI cable?

    I've been looking everywhere to find a Lighting to HDMI cable so that I can plug my iPhone into the TV to watch movies, set up a slideshow of photos etc. and I can't find one anywhere. Does such a product exist?