How do I create a script to do this?

I have a photoshop file with several layers...about 100. I want to put each layers into it's own group. The name of the group must be the same as the name of the layer.
I tried creating a action to do this but it did not work right. It only works for one layer selected individually. If I select multiple layers, then it forms nested groups.
I was told that I can't do this using an action and I would need a script for this.
How do I create this script?
I am using adobe photoshop cs6 ( I think) , windows 7.

This assumes that none of the layer are already in layerSets( group ) and none have layer locking.
if(app.documents.length>0){
    var doc = app.activeDocument;
    while(!doc.artLayers[0].isBackgroundLayer && doc.artLayers.length>0  ){
        var newSet = doc.layerSets.add();
        newSet.name = doc.artLayers[0].name;
        doc.artLayers[0].move(newSet,ElementPlacement.INSIDE);

Similar Messages

  • How to automate creating installation script?

    SQLDeveloper has a nice tool which would create installation script for a database application: Deploying an Oracle Database Application However it is not automatic - you have to choose objects to export and tables to dump rows every time you create an export script. Is there a way to automate it or maybe another tool to create an installation script? I though of Introducing oraddlscript | devioblog but it doesn't seem to create a file invoking creating all other objects in the appropriate order. Oracle exp tools are also inappropriate because I need a seperate file for each object so that I could commit them to SVN and keep track of changes.

    DDL Wizard Seems fine, but it required Oracle export using exp. And exp cannot export tables with BINARY_DOUBLE columns or nested tables. And installing Oracle Database link is not about installing application.

  • Is it possible to create a script that does this?

    Hey there,
    I can work my way around a Mac pretty well, but as for coding, I'm not as good. Hopefully someone will know how to do what I'm looking for:
    I do a lot of school assignments on my computer, and I've recently utilized an online service that allows me to sync up my files on my computer with their servers (like MobileMe, but not). Anyway, this is great and all, but this service is virtually useless if I'm trying to access a Pages publication via my school's computers which run Windows and, consequently, Microsoft Word 2007. However, they ALSO run Adobe Reader. Is it possible to create a script that, every time I save a Pages publication, automatically creates a PDF export of that same file in the directory where I'm working? Also, when I update the Pages file, it'll automatically update the PDF file?

    Saving a script as a Script, an Application or an Application bundle requires the use of the Script Editor as explained in the System (Finder) help.
    step 1:
    open the script in the Script Editor
    step 2:
    compile it clicking the "Compile" button
    step 3:
    Save the script from the "File > Save" menu:
    To save as "script" select the "script" menu item
    To save as "Application" select the "Application" menu item
    To save as _"Application Bundle"_ select the _"Application Bundle"_ menu item
    The files which I post are saved thru the "Text" menu item which attache the extension name ".applescript" telling that it's an _Applescript's text file._
    All these infos are given in resources pointed by my late messages !
    Now are infos which maybe you will not find in the Apple's resources
    I use the text (.applescript" format because it embeds nothing related to my machine.
    To work from the Scripts menu, my best choice is "Script" which appears to be the fastest one.
    "Application" is slower and sometimes gives odd results on MacIntels.
    "Application Bundle" behaves well on every machines but is slower than "Script".
    Yvan KOENIG (from FRANCE vendredi 29 mai 2009 09:53:21)

  • How do I create a Skype Name in this new environme...

    For a variety of reasons, I have created a new Microsoft Account. In attempting to set it up with Skype, I was never asked to create a Skype Name. This has created issues sining into Skype, as well as telling people how to Skype me. I do NOT want to give them my email address as my Skype contact. A Skype name is much more suited for this situation.
    How do I create a Skype name that people can use to call me?
    This beggs the question of why Loging into Skype and idnetification is co complicated. Associated with this one account there are the following methods of primary identification: Skype Name, Microsoft Account, Display Name, Skype Community Name, and there seems to be an additional display name for each Skype accont in the Community which begins with live: and then a modified form of the user's email address. That is A LOT to remember. I had a difficult time just logging in because it asks for my Skype name and the blank would not accept any of the aforementioned identifications. I had to get here by signing into Skype Desktop and then clicking a link to go through rather than signing in. The sign in would not accept my credentials.
    Bottom line is all these issues would go away if I could figure out how to get a skype name.

    See this:
    http://community.skype.com/t5/Security-Privacy-Trust-and/New-to-Skype-and-having-trouble-signing-in/...

  • How to automatically create a script based on XML input

    I was wondering if it is possible to automatically generate a script in Flash itself, so like a plug in or something that I can build that will allow me to take in an xml document and generate scripts on certain frames in certain movie clips
    or is it better to create a swf where users load in an xml file and things just happen from that (would that be safe? could I guarentee that no one would be able to screw things up?)

    Here are the steps to do for your requirement.
    1) In design console, create a rule like user-type ="end user"
    2) Create a role using the above rule and also create an access policy to provision these two resources using the above role.
    2) In design console, go to resource object --> select resource2->dependency tab--> assign resource1.
    3) Try to provision resource 1..it should provision resource 2 as well.

  • How do I create a script to crop the channels within specific limits defined by me?

    Hi,
    I am trying to automate processing of my channels, but as a first step I need to crop them within specific boundaries (all data at once).
    Kindly let me know any specific script commands which would help me in doing the same.
    Solved!
    Go to Solution.

    Hi Brad_Turpin,
    I have attached a sample data with this post for your reference. In the attached file, there is one time channel (X axis) and one data channel (Y axis), and I need to crop both the channels apart from 0 to 20 sec.
    I checked the syntax for DataBlDel() which is 'Call DataBlDel(ChnNoStr, ChnRow, ValNo, [ValDelOnly])'. What I understand from this is (please correct me if I am wrong), I need to input the 'row no.' and the number of values from and to which I want to delete values from the channel data.
    But the problem for using it is that the 'row no.' and the number of values I want delete may vary when I pull in a different dataset. (i.e. If you look at the attached file you can see that for this example time channels starts from -5 to 40 sec, but for a different dataset time channel may start from -10 to 35 sec. But my requirement for the new dataset still remains same, that is from 0 to 20 sec). What should I do for this condition
    Additionally, I would also like to know the best way to crop if I am having more than one data channels (lets say, I am having 5 data channels apart from the time channel and want to crop all of them from 0 to 20 sec).
    Hope I have not confused you, please let me know for further clarification of my requirement.
    Thanks in advance.
    Regards,
    Fazil Shah.
    Attachments:
    to crop_1.zip ‏7 KB

  • How can I create a script to delete all Layer Comps?

    I know this has to be pretty easy but I'm flummoxed on the syntax. Thanks, in advance!

    // 2012, use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    while (myDocument.layerComps.length > 0) {
    myDocument.layerComps[0].remove()

  • How do you create a script?

    I'm trying to add a time and date stamp to photos.

    I would suggest something like this can be tried easily.
    http://erlind.blogspot.in/2012/01/photoshop-timestamp-your-digital-photos.html
    -Mandhir

  • How can i create a Package to make this above procedure fit under it ??

    Hi ,
    I am going through package tutorials in Oracle , but unfortunately i couldn't able to follow :
    On Web , They simply say that Packages are used to group Procedures or Functions of similar kind .
    Could any please tell me how this is possible ??
    Assume that i have a simple Stored Procedure as shown below :
    CREATE OR REPLACE PROCEDURE emp_sel (cv_results IN OUT SYS_REFCURSOR)
    IS
    BEGIN
    DBMS_OUTPUT.PUT_LINE('Hi my First Package');
    END;
    Please help , thanks .

    package is basicly a group of procedures, functions, type definitions, etc... if you put this procedure into a package you can do this:
    a package has two parts, spec and body, spec is interface for outside and body is source code.
    create or replace package DUMMY_Pkg is
      PROCEDURE emp_sel (cv_results IN OUT SYS_REFCURSOR);
    end;
    create or replace package body DUMMY_Pkg is
      PROCEDURE emp_sel (cv_results IN OUT SYS_REFCURSOR)
      begin
         dbms_output.put_line('something');
      end;
    end;
    /

  • Newbi Question:  How does one create a similar page to this using APEX 3.1?

    Hi,
    I am trying to create a help document with screen shoots inside our APEX web application and I am hamstrung by the type of Region and Item objects available to me. When I tried to create HTML region I was limited to how much html characters I can put in the source. When I look into the item menu nothing seems to allow me to stick in large chunk of HTML code either.
    A little searching on this forum and I came across this page: http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm#t
    It is exactly the type of page I want to create with lots of text and screen shots and I presume that it is built within APEX? So my questions is: How did they do this? Did they use tools available within APEX or some external tool? Was all this outputted using BLOB and Htp("") and PL/SQL? I am trying hard to avoid having to do that.
    I was also unable to stick in an in image into my page using instruction from http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/ui.htm#CBBHGJCH which left me pretty frustrated. (external amazon gif worked).
    Thanks for any help,
    Wayne

    Wayne,
    I am glad that you got images to display. I am not sure what kind of html report you want to display, there is a limit of number of characters in a region its 32767 characters, so if you want to display large html file you can create html region with no template and limit each region to 30,000 characters and create as many region as you want.
    If you want to display data from any table ( as per the first url) you can create SQL reports, something like
    select ename
         , deptno
         , sal
         , case
              when ename = 'SCOTT' then '<img src="#WORKSPACE_IMAGES#us_flag.gif" alt="Image Title">'
              when ename = 'SMITH'  then '<img src="#WORKSPACE_IMAGES#chants.gif" alt="Image Title">'
              when ename = 'MARTIN' then '<img src="#WORKSPACE_IMAGES#cloche.gif" alt="Image Title">'
              when ename = 'MILLER' then '<img src="#WORKSPACE_IMAGES#chandelles.gif" alt="Image Title">'
              when ename = 'JONES' then  '<img src="#WORKSPACE_IMAGES#shoe.gif" alt="Image Title">'
              else '<img src="#WORKSPACE_IMAGES#hallo.gif" alt="Image Title">'
         end  image
    from empThanks,
    Manish

  • How do I create & edit a pattern like this in Illustrator?

    I want to know how to create and edit a pattern like this in Illustrator:
    And then be able to do this:
    (same pattern with blue square effect)
    Any advice would be appreciated.

    Read up on creating patterns. This one is just simple lines and very easy to do, but remember that the defining rectangle MUST be at the very back of the stack:
    Start off by making your pattern tile (top). Drag the drawing to the Swatches panel.
    Fill a rectangle with the pattern. Scale and rotate the pattern fill (see Scale and Rotate dialogues).
    Recolour the pattern using Edit > Edit Colors > Recolor Artwork

  • How do I create an genericized instance of this class?

    Hi, I'm having trouble creating a proper generic instance of this class that I wrote. The class type is cyclic dependant on itself.
    public class MyClass<T extends MyClass<T>>
    I can create an instance like this:
    MyClass<?> class = new MyClass();But I would be mixing raw types and generic types.
    Is there anyway to create a proper generic instance of MyClass?
    Thanks a lot
    -Cuppo

    Ah thanks georgemc,
    your solution will certainly work.
    If i may ask your opinion of something...
    MyClass is designed such that the type parameter should always be the same as the class itself. It's kinda a hack to get the subclass type from the superclass.
    so a hierarchy looks something like this:
    class MyClass<T extends MyClass<T> >
    class SubClass<T extends SubClass<T>> extends MyClass<T>
    class FinalSubClass extends SubClass<FinalSubClass>So ideally i would want something like:
    MyClass m = new MyClass<MyClass>();
    (which is not possible)
    is there a way to get around this?
    -Cuppo

  • How would I create a photo gallery like this in Muse?

    Just trying to get the same kind of abilities working in muse. Link for site/gallery below
    greg noire - photographer

    You can try using lightbox widget. Try playing with opacity in normal and rollover states of thumbnails.
    Else, you can add another image on rollover state of thumbnail which may be a little darker than the original one.

  • My iphone backup is crypted, I don't have the password. How do I create an uncrypted backup from this point?

    I hope there is a way to do this and keeping all my earlier info.

    There is no way to restore an encrypted backup if you have lost the password. You can still retain the old backup and make a new unencrypted backup, however.
    iOS: Back up and restore your ...

  • How would you create a read/display only applicaiton montior role for SRM

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

    Hello,
    I was hoping to get some insight on how to create a display/read only SRM Application monitor role.  This role would be used by our Service Desk to perform basic trouble shooting before escalating.  Currently in our system it is tied into a tab named SAP Administration and has the capability of doing more than read.  How do you create a read version of this to only display the application monitoring in read mode? We currently have an SRP role that has the followiing auths below.  Would a EPP portal role need to be created and if so how>  Thank you for any assistance.
       Manually   BBP Component                                                BBP
              Manually   SRM: General Access Authorizations in EBP                    BBP_FUNCT
               Manually   SRM: General Access Authorizations in EBP                    T-SD59003000
                 Function in SRM (for Authoriza MON_ALERTS                                                                  BBP_FUNCT
    - Todd

Maybe you are looking for

  • One PO multiple vendors

    We have a process, not currently in SAP where we would issue one purchase order for a product but pay two vendors.  It is not currently in an ERP system, so the manual entries are made how they need to be made.  We are trying to get this same process

  • Require Fields and Find/ Execute Mode

    Hi Gurus, I am using Jdev 11.1.2.2.0. I am trying to implement Enter Query and Excute Query like functionality in ADF. I drop the find operation from data control and execute the operation. I press the find button and enter my search condition and wh

  • Handling Date

    Scenario: I have news archive html form that'll search news from this date to this date. I have given option list as day, month, year I am getting value of month as number and started from 0 (i.e. jan) 2. in servlet file I am getting the parameters o

  • Cloning Oracle 11g to 10g

    Hi Guru's, I have a query regarding clonning DB from 11g o 10g. Machine A is on linux with DB Version 11g and machine B is on windows with DB Version 10g. Is it possible to clone DB 11g which is on Linux machine to DB 10g which is on Windows machine.

  • Authorization for display_all

    Hi Friends,                Any one help me to create a profile (or) a role to give Display all the T-codes in Customizing screen.