How to get info from a layer which is  applied  with styles  ?

How to get info from a  layer  ?  such  as   (  apply  style  or  not , which  effect  have  applied  on  it  etc..)
I  really  can't  solve  it , Who can hlep me..  By the way , I 'am  using  CS version.  

xtools/xlib/Styles.js has a set of functions for working with layer styles. I do not know if it works with CS. I wrote it several years ago for either CS or CS2. If this doesn't work, then nothing will. The script retrieves a layer's style by saving it to disk then parsing the file for the desired ActionDescriptor.
There is a function at the bottom of the file that tests the Styles.js API.
Styles.test = function() {  var doc = app.activeDocument;
  var layer0 = doc.artLayers[0];
  var gdesc = Styles.getLayerStyleDescriptor(doc, layer0);
  if (!gdesc) {
    alert("There is no layer style associated with the layer");
    return;
//   this will set the layer style to another layer.
//   var layer1 = doc.artLayers[1];
//   Styles.setLayerStyleDescriptor(doc, layer1, gdesc);
  if (!gdesc.hasKey(cTID('FrFX'))) {  // look for a stroke effect
    return;
  var frfx = gdesc.getObjectValue(cTID('FrFX'));
  if (!frfx.hasKey(cTID('Clr '))) {   // look for the color
    return;
  var clr = frfx.getObjectValue(cTID('Clr '));
  // we should really check that the objectType is RGBC
  var r = clr.getDouble(cTID('Rd  '));
  var g = clr.getDouble(cTID('Grn '));
  var b = clr.getDouble(cTID('Bl  '));
  if (r == 0 && g == 0xFF && b == 0xFF) {
    return;
  clr.putDouble(cTID('Rd  '), 0);
  clr.putDouble(cTID('Grn '), 0xFF);
  clr.putDouble(cTID('Bl  '), 0xFF);
  frfx.putObject(cTID('Clr '), cTID('RGBC'), clr);
  gdesc.putObject(cTID('FrFX'), cTID('FrFX'), frfx);
  Styles.setLayerStyleDescriptor(doc, layer0, gdesc);

Similar Messages

  • I have a new MacAir and don't know how to get info from my USB stick and my SD photo card.  Can anyone help me please?

    I have a new MacBook Air and don't know how to get info from my USB stick and get info from my SD card.  Can anyone help, please?

    Plug the stick and/or card into the appropriate slots on the side of your Air. Do you see icons for the devices appear on the desktop? Click into them to see what files are there.
    Matt

  • How to get info from a .class file at run time? thanks for help

    I need to get methods and properties (variables) from a .class file at run time.
    as u know, javap.exe can do that in an independent way. but i need to get info at run time once the .class or packeges have been changed, javap is not suitable in the case.
    i try to read data directly from .class file but it's hard to know the file format.
    e.g. a class looks like (java file):
    class MyClass extends Frame
    int i0;
    String s0;
    public String getName()
    if the file is compiled to .class file, how to get properties (variables: i0,s0) and methods String getName() from the .class file by an applicaton at run time?
    Doclet is not suitable for speed reason, it is too slow to get right info in right format.
    Thanks for any help, please write a little bit more in detail if you know.

    Use the Java Reflection API. Have a look at the Reflection section of the Java Tutorial located at http://java.sun.com/docs/books/tutorial/reflect/index.html

  • How to get info from weblogic-ejb-jar.xml? (MDB)

    I'm writing an MDB which is part of a request/reply. In order to reply, I
    need an initial-context-factory and provider-url. Is it possible to get
    this information using the MessageDrivenDescriptorMBean class? I can see
    that MessageDrivenDescriptorMBean has getConnectionFactoryJNDIName() and
    getProviderURL() which should be what I want, but I have no idea how to get
    an instance of MessageDrivenDescriptorMBean. Can I do that in the
    setMessageDrivenContext method of my MDB?
    If not, I can put that information in the env, but I'd rather not do that as
    it is redundant information.
    Thanks.
    Eric

    Forgot... WL6.1.
    "Eric F" <[email protected]> wrote in message
    news:[email protected]..
    I'm writing an MDB which is part of a request/reply. In order to reply, I
    need an initial-context-factory and provider-url. Is it possible to get
    this information using the MessageDrivenDescriptorMBean class? I can see
    that MessageDrivenDescriptorMBean has getConnectionFactoryJNDIName() and
    getProviderURL() which should be what I want, but I have no idea how toget
    an instance of MessageDrivenDescriptorMBean. Can I do that in the
    setMessageDrivenContext method of my MDB?
    If not, I can put that information in the env, but I'd rather not do thatas
    it is redundant information.
    Thanks.
    Eric

  • How to get response from a servlet which depends on cookies?

    guys,
    i have a servlet which behaves differently based on the presence of a cookie or not. If cookie A is present in the machine it shows the the home page and if not it shows the login page.
    now i want to get the home page HTML content from a program without using the browser. i am aware this can be done by using java.net.URL but how do i simulate the cookie given that i know that's the cookie name and value it expects?
    Unfortunately i cannot paste the servlet code as it is a servlet of a product and i don't have the source code for it.
    Thanks
    S

    I believe you use URLConnection.setRequestProperty(), with the key being "Cookie".

  • How to get result from SharePoint site which is on different server.

    We have two SharePoint site on two different server. We want to create search which will search and display content of one one site on other site.
    If this is possible then pls let me know how can I do this. If you have any links/blogs pls share with me.
    Rushikesh_Khadtare

    Hi  ,
    According to your description, my understanding is that you need to create search which will search and display content of one site on other site.
    For your issue, you can deploy a "search center" site in each web app. 
    Any time you perform a search from a search center site, it by default searches all content (using All Content scope) in your index, regardless of web app.
    Take the following steps:
    * Go to  Search Service Application
    * Click Content Sources
    * Select Edit from the Local Office SharePoint Server sites
    * In Start Addresses add the urls of all web applications that you want this content source to crawl
    After a crawl you should now be able to search/find data from all web applications.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to get info from App buyer - Action Script 3 for iOS mobile

    Hello;
    I have a client that needs to track the salesperson (or store) who sells an Apple App. They need this information to be able to pay sales commissions and I want to make sure that commissions are only paid once for each sale.
    I will have a screen that appears when the App is installed that asks which salesman/store convinced them to buy the app... then the app will send us an email with the salesman's information...   How can this email (or other type of message) include a unique identifier - like the Apple ID - so I can prevent a buyer from uninstalling/reinstalling the app to be able to send another message and thereby causing us to pay a second commission for the same purchase?
    Thanks for all your help.
    -Rick

    do you want your 10 animations to play simultaneously or sequentially or something else?

  • How to get info from imported file in an outbound campaign IVR-based. UCCX 8.5.

    Hello.
    Somebody knows if it is possible to get the information inside my ivr script from the file imported when I create an outbound campaign IVR-based?
    I want to store in variable data like first name, last name, account number... And use them in the flow of my IVR script.
    I´m using UCCX 8.5.
    Regards

    did you get this to work ?

  • How to get info from calling Function Module without passing it.

    Hi,
    I am facing a problem like from calling function module i want values of some variables and i dont want to change the import and export parameters, is there any way to get it done...
    Thanks in advance...

    Hi,
    It is possible only if you can find the memory id of the varibale.
    You can find out it by debugging
    <removed by moderator>
    Edited by: Mike Pokraka on Aug 4, 2008 9:37 AM

  • How to get indesign from iMac to mac powerbook which does not have cd slot?

    how to get indesign from iMac to mac powerbook which does not have cd slot?

    That will not work!
    You cannot copy or migrate Adobe applications from computer to computer. There are a whole host of files in different locations which have to be installed, and copying will not do it.
    In fact, you'll now have to use the Adobe Cleaner tool to remove the mess you created. You can get to it here:
    Use the CC Cleaner Tool to solve installation ... - Adobe

  • How to get BOOLEAN from STORED FUNCTION

    We are calling legacy PLSQL stored procedures and functions via named queries. This has worked fine so far, but there are some functions which return the type 'BOOLEAN'. e.g.
    FUNCTION some_function( some_argument IN NUMBER) RETURN BOOLEAN;
    Where the return type is BOOLEAN calling the named query fails with
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    A couple of threads have hinted that what we are trying to do is not possible:
    How to get BOOLEAN from STORED PROCEDURES
    Re: Creating Named Query: from OracleCallableStatement
    This would possibly be due to 'restriction in the OCI layer'. Can anyone help? Is there really now way to call a valid PLSQL stored function via a named query when the return type is BOOLEAN?
    thanks

    I can't comment on possible issues you might have with the driver, but if it can be done in JDBC, it should be possible in TopLink.
    TopLink has the StoredFunctionCall which extends the StoredProcedureCall but adds an unnamed ouput parameter in the first spot of its parameter list. You will need to get the databasefield and set its type to BOOLEAN ie:
      DatabaseField returnField = (DatabaseField)yourStoredFunctionCall.getParameters().firstElement();
            returnField.setName(name);
            returnField.setSqlType(Type.BOOLEAN);Be sure not to use the setType() method, as I believe TopLink will try to use the Type.BIT when a boolean class is used as the classtype.
    Best Regards,
    Chris

  • It is possible to get info from the PDF

    Hi Everyone,
    I'm new baby to acrobat using javascript. It is possible to get info from the PDF.
    The Info contain like Color space, Trim size, which font  used depend on pages and which color is used for image & text.
    Thanks in advance.
    -yajiv

    Hi GKaiseril,
    Thanks for prompt response.
    Actually I'm a new baby to Acrobat script. Please explain briefly How do I write java script and execute.
    I'm familiar with Photoshop and Indesign Script. We are using ExtendedScript Toolkit editor for writing script.
    Thanks in advance.
    -yajiv

  • How to get file from server while click on link

    Hi,
    i created on link and i gave one server path to select file from server but while clickinng on link it no displaying any thing.
    following is the Destination url that i gave for the item.
    /u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/
    please tell me how to get file from server while click on link.

    Ok I got your requirement now.
    If you are getting file names from view attribute then you should not be adding destination URI property for the link.
    Instead you can use OADataBoundValueViewObject API.
    Try below code in your controller processRequest method:
    I am assuming that you are using classic table.
    Also in below example it considers OAMessageStyleText and you can replace it with link item if you want.
    OATableBean tableBean =
    (OATableBean)webBean.findChildRecursive("<table item id>");
    OAMessageStyledTextBean m= (OAMessageStyledTextBean)tableBean.findChildRecursive("<message styled text in table item id>");
    OADataBoundValueViewObject tip1 = new OADataBoundValueViewObject(m, "/u08/app/appvis/xxex/inst/xxex_apps/xxrbe/logs/appl/conc/log/"+"<vo attr name which stores file name for each row>");
    m.setAttributeValue(oracle.cabo.ui.UIConstants.DESTINATION_ATTR, tip1);
    Regards,
    Sandeep M.

  • How to get FILENAME from FILE PATH

    does anyone know how to get filename from a file path for example
    FILE PATH: C:\Project\uploadbean\web\uploads\Button.txt
    returns
    FILENAME: Button.txt

    @BalusC
    ust for a reference cause i'm new in JSP This has nothing to do with JSP, but with basic knowledge of an essential API. I have given you the link to the File API. Are you saying that you refused to read the API documentation, which clearly explains you how to use the File and shows which methods are all available to you undereach the straightforward getName() method, and expecting that the others may chew the answers for you? Loser.

  • How to get videos from touch, in full resolution?

    How to get videos from touch, in full resolution?
    I tried email, but that compresses them.

    Import them as you would from any digital camera.
    http://manuals.info.apple.com/enUS/iPod_touch_iOS4.1_UserGuide.pdf

Maybe you are looking for

  • IPOD Not Recognized Correctly by Windows

    3rd generation Nano ... worked fine until upgraded I-tunes to 7.6.1.9 ... now device manager sees IPOD but shows yellow balloon and exclamation point. I-tunes does NOT see the IPOD. Followed instructions in Apple article 305136 to uninstall and re-in

  • Send report output(alv display) as email to end user

    I have developed a report the output of which has to be sent to the end user if he enters his email id in selection screen. The out put is in alv form. Pls can anyone tell me how to send this displayed output as an email attachment using function mod

  • Web services  doubt

    hello i want to be update the database every day with out client side application(like automatically update the database only once for a day),can i use 'Web Services' tech for that,or any alternative ,if it please let me know what it is.

  • Cleaning the queued calls in the outbound autodialer

    Hi All; In outbound auto dialer, I have a calls queued and I do not need to do outbound call for it, from where I can remove these calls to avoid trying to do outbound calls for it? I tried to do delete for all the records existed in the database for

  • Photoshop Camera Raw 8.1 will not update

    I'm getting an error (U44M1|208) everytime I try and update Camera Raw from Application Manager. The error occurs after downloading and during installation. I've attempted several times in several different ways : I'm also getting an error (U44M2P7)