Is there a script to make specific attrubute changes to all layers in project?

Hello, and thank for your time!
I have a project that contains a lot of comps with a lot of shape layers in each.
Is there a way to make global changes to stroke size property of shape layers, for example from 0px to 1px?
Thanks.

This should work for you. Towards the very bottom is the code line that you can set for the width value. It will look like this a.property(i).setValue(1.0); //STROKE WIDTH VALUE
//START
var proj = app.project;
var comps = getAllProjectComps(proj);
for(var i=0; i<comps.length; i++){
          searchLayersAndChangeVal(comps[i]);
function getAllProjectComps(sourceFolder){
          try{
                     var itemAry, itemsInFolder, itemsInFolderLength;
                     itemAry = new Array();
                     itemsInFolder = sourceFolder.items;
                     itemsInFolderLength = itemsInFolder.length;
                     for(var i=1; i<=itemsInFolderLength; i++){
                               if(itemsInFolder[i] instanceof CompItem){
                                        itemAry[itemAry.length] = itemsInFolder[i];
                     return itemAry;
          }catch(err){alert("Error at line# " + err.line.toString() + "\r" + err.toString());}
function searchLayersAndChangeVal(compSource){
          var layerCollect = compSource.layers;
          var layerCollectLength = layerCollect.length;
          var curLayer, props, propsLength;
          var propObjAry = new Array();
          for(var l=1; l<=layerCollectLength; l++){
                    curLayer = layerCollect[l];
                    if(curLayer instanceof ShapeLayer){
                              getStrokeWidthAndChangeValue(curLayer);
function getStrokeWidthAndChangeValue(a){
          try{
                    var propLength = a.numProperties;
                    for(var i=1; i<=propLength; i++){
                              if(a.property(i).matchName == "ADBE Vector Stroke Width"){
                                        a.property(i).setValue(1.0);          //STROKE WIDTH VALUE
                              if(a.property(i).numProperties > 0){
                                        getStrokeWidthAndChangeValue(a.property(i));
          }catch(err){alert(err.line.toString() + "\r" + err.toString());}
//END

Similar Messages

  • Is there a script to make automatic footnotes?

    Yeasterday my boss gave me a book to lay out.
    I must do alphabetic index and over 1200 footnotes. If I imagine this proccess, it makes me sad
    The first part of this job isn't hard, because I plan to use two brilliant scripts to make index: IndexBrutal and IndexMatic.
    You can download  them from this website http://marcautret.free.fr
    But I need and plead for your help with footnotes. Is there a script to make automatic footnotes?
    Or, maybe, you know the faster way to do this boring repeating of mouse cliks?????
    Thanks a lot.

    Depends on what you mean by "make" footnotes. What are you making them from? I used a script from http://www.adobescripts.com/modules/mydownloads/viewcat.php?cid=9 once to convert thousands of endnotes back to into footnotes. And I'm sure there's a similar way to automate the process (either through scripting or a find/replace) if your footnotes are embedded in text but marked some way. For instance, if your footnotes look like this at the moment:
    text more text footnote number comes next (22) text of footnote here end of footnote comes next\ more text following footnote
    In this case, all footnote numbers show up between parentheses and all footnotes end with a backslash. If your footnotes are marked beginning and end in some similar fashion, then there's hope.
    Ken Benson

  • Is there a way to make an audio clip not cover the whole project? I want to add audio clip or song and let it start at a certain point in the project. I'm working with iMovie on IPad!

    Is there a way to make an audio clip not cover the whole project in iMovie? I want to add audio clip or song and let it start at a certain point in the project. Whenever I add audio or song it covers the whole project. I'm working with iMovie on IPad!

    Thank you for your reply Karsten but unfortunately this didn't help me so far. Or maybe I'm missing something?
    First the link is a tutorial for iMovie on a Mac. I'm using iMovie on iPad so the steps are inapplicable.
    Second it is only possible for me to manipulate the end part of the sound clip to whichever duration I want. But I can't do the same with the 'beginning' of the sound clip.
    I simply want to place some photos in the beginning of my video with no sound in the background then after like 2 secs I want to start the music clip. For some reason that is not possible! Cause every time I drop the music clip unto my project timeline it automatically place it self along with the first frame in the project! And consequently the photos and music are forced to start together.
    Hope I'm making sense...

  • As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

    As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

    As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

  • How can I make a global change so all controls and indicators labels on the front panel change to another colour?

    How can I make a global change so all controls and indicators labels on the front panel change to another colour?
    I need to change the front panel so that it can be used in a dark environment.

    Hi
    The only way I see, is to use the "Controls[]" property and iterate through all of them. But don't forget about nested elements (i.e. clusters, tab-controls, ...).
    Thomas
    Using LV8.0
    Don't be afraid to rate a good answer...

  • Is there a way to make PSE 13 NOT open all my photos when I open the program?

    Is there a default location when I can change it so that when I open PSE 13 Organizer it does not open all the photos in the Album?  I would rather that It just opened the Folders and let me choose which file to open.  I have Windows 7 if that makes any difference.  thanks...

    Is it the same question than in this post ?
    PSE13 Organizer display (folder vs. album view) - Elements Village

  • Is there a way to make the shuffle mode play all songs before repeating?

    Too often, the shuffle songs mode seems to lock into a few artists and albums, and all too often plays songs I heard yesterday (or very recently). I have a large library. Is there a way to make iTunes and/or my iPod shuffle songs to a degree that I get to hear all songs before they are repeated?

    Yes — don't stop the music. Both iTunes and iPods will shuffle your entire library (or playlist), playing each song exactly once before stopping. If you sync your iPod or navigate to another playlist, shuffle will get re-shuffled; if you leave it paused in the middle of shuffling, the shuffle will continue when you start it up again.
    Alternatively, you can create a smart playlist that only contains music you haven't heard in the last N days, then shuffle that instead.

  • Is there a script or automator action to change Preferences in Safari?

    When I log on to my ISPs website to clean out my spam filter, the site redirects me to a second area that contains the filtered spam. Each time I access it I must change my "Accept Cookies from "Only sites you navigate to" to "Always". The problem is remembering to change it BACK. Is there an applescript or automator thingy that will allow me to to make these changes? I'm using Safari 3.1.2.
    Thank you.

    Andrew, this script also really helped me, and it has the potential to help thousands of others. Safari 3 cookie management is a work in progress. SafariPlus did a wonderful job of improving this previously, but so far no Leopard version. Even limited cookie acceptance accepts waaay too many. So I decided to delete all my cookies, and turn on just limited acceptance the first time I visit certain websites that really need cookies, to get the primary account cookies in place, and then set cookie acceptance level back to never for general browsing.
    Then I looked for an Applescript to simplify this, and found the one you wrote. I then modified it for my purposes and it works great. I run it with XKeys and it makes life easy, and more secure. I think many others could benefit from this, so I think one of us should publish it perhaps at Versiontracker, etc. Your basic script, so I vote for you. If not, can I? Here's my mod:
    tell application "Safari" to activate
    tell me to activate
    display dialog "Would you like to accept LIMITED cookies?" buttons {"Cancel", "OK"} default button "OK"
    if button returned of result is "OK" then
    tell application "Safari" to activate
    tell application "System Events"
    tell process "Safari"
    click menu item "Preferences…" of menu "Safari" of menu bar 1
    delay 1
    tell window 1 to click button "Security" of tool bar 1
    delay 1
    tell window "Security"
    tell group 1
    tell group 1
    tell radio group 1
    click radio button "Only from sites you navigate to"
    delay 0.5
    keystroke "w" using command down
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell
    end if
    delay 60
    tell me to activate
    display dialog "Click 'Cancel' to continue accepting LIMITED cookies... Click 'Not Yet' for continued reminders... Click 'Revert' to STOP accepting cookies." buttons {"Cancel", "Not Yet", "Revert"} default button "Revert"
    if button returned of result is "Revert" then
    tell application "Safari" to activate
    tell application "System Events"
    tell process "Safari"
    click menu item "Preferences…" of menu "Safari" of menu bar 1
    delay 1
    tell window 1 to click button "Security" of tool bar 1
    delay 1
    tell window "Security"
    tell group 1
    tell group 1
    tell radio group 1
    click radio button "Never"
    delay 0.5
    keystroke "w" using command down
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell
    else
    if button returned of result is "Not Yet" then
    repeat while button returned of result is "Not Yet"
    tell application "Safari" to activate
    delay 30 -- increase if desired to lengthen interval between reminders
    tell me to activate
    display dialog "Click 'Cancel' to continue accepting LIMITED cookies... Click 'Not Yet' for continued reminders... Click 'Revert' to STOP accepting cookies." buttons {"Cancel", "Not Yet", "Revert"} default button "Revert"
    end repeat
    if button returned of result is "Revert" then
    tell application "Safari" to activate
    tell application "System Events"
    tell process "Safari"
    click menu item "Preferences…" of menu "Safari" of menu bar 1
    delay 1
    tell window 1 to click button "Security" of tool bar 1
    delay 1
    tell window "Security"
    tell group 1
    tell group 1
    tell radio group 1
    click radio button "Only from sites you navigate to"
    delay 0.5
    keystroke "w" using command down
    end tell
    end tell
    end tell
    end tell
    end tell
    end tell
    end if
    end if
    end if

  • Is there a script to open an attachment within a PDF in a separate window?

    I have a PDF with a button to open an attachment. I know that in my preferences I can set it always open in a separate window, but not all users know to do this. Is there a script to make this happen? I have a script to open links in a separate window, but not an attachment.

    This can't be done with a script, but you can do it manually by going to
    the link you created, editing the "Go to a page in another document" action
    in it and then setting the "Open in" option to "New Window".
    This can also be done with a stand-alone tool, but that is more
    complicated, of course.

  • Are there any init.ora parameters which can't be changed at all ?

    DB version: 11gR2
    We have the following two types of initialization parameters
    Dynamic - Which can be changed without a DB bounce (example CURSOR_SHARING)
    Static  - Which can be changed only with a DB bounce (example MEMORY_MAX_TARGET )
    Both types of init parameters mentioned above can be changed with or without a DB bounce. Are there any initialization parameters which cannot be changed at all  with or without a DB bounce?

    Max wrote:
    Oracle documentation which describes init.ora parameters is 'Oracle Database Reference 11gRelease 2'. It doesn't answer my question
    Maybe it does.
    from DB_BLOCK_SIZE
    The value for DB_BLOCK_SIZE in effect at the time you create the database determines the size of the blocks. The value must remain set to its initial value.

  • Is there any config to block PR fromn changes in CJ20n when PO exists

    Dear All,
    Could you please advice...is there any way to block PR from changes (quantity,price, etc) in project builder (cj20n) , when PO exists already.
    Many thanks in advance.
    Nies

    ok

  • Is there a script that it can make Overflow text automatically routed Next?(Not the main text frame)

    Is there a script that it can make Overflow text automatically routed Next?(Not the main text frame)
    when I run the scrip,Overflow text can auto Typesetting to the next page?
    thankS Supreme~

    Here's the script I use. Notice the complications getting the live area when other than rulers per spread is employed. The script automatically selects the final selection point in the story and moves to that page in the active window.
    //DESCRIPTION: Autoflow selected overset story
    (function(){
              if (app.documents.length > 0
                                  && app.selection.length == 1
                                  && app.selection[0].hasOwnProperty("parentStory")
                                  && app.selection[0].parentStory.overflows) {
                        app.doScript(fixOverset, undefined, app.selection[0].parentStory, UndoModes.entireScript, "Fix Overset");
              } else {
                        alert("There must be a selection that identifies the overset story.");
              function fixOverset(story) {
                        while (story.overflows) {
                                  var aDoc = story.parent;
                                  var lastTF = story.textContainers.pop();
                                  var lastPage = lastTF.parentPage;
                                  if (lastPage instanceof Page == false) {
                                            alert("Story ends on pasteboard; no action taken.");
                                            return;
                                  var master = lastPage.appliedMaster;
                                  var newPage = aDoc.pages.add(LocationOptions.after, lastPage);
                                  newPage.appliedMaster = master; // may not be necessary
                                  var liveArea = getLiveBounds(newPage);
                                  var newTF = newPage.textFrames.add({geometricBounds : liveArea, layer : lastTF.itemLayer});
                                  newTF.previousTextFrame = lastTF;
                                  if (newTF.insertionPoints.length == 0
                                                      && lastTF.insertionPoints.length == 0) {
                                            // allows for paragraph style with startParagraph on specific page side
                                            alert("Story is permanently overset.");
                                            return;
                        selectIt(story.insertionPoints[-1]);
              function getLiveBounds(page) {
                        var rO = page.parent.parent.viewPreferences.rulerOrigin;
                        var bounds = page.bounds;
                        if (rO == RulerOrigin.spreadOrigin) return returnBounds(page, bounds);
                        var width = bounds[3] - bounds[1];
                        if (rO == RulerOrigin.spineOrigin &&
                                            (page.side == PageSideOptions.leftHand ||
                                                      (page.side == PageSideOptions.rightHand &&
                                                                page.parent.pages.length > 1)) ||
                                  (rO == RulerOrigin.pageOrigin &&
                                            page.side == PageSideOptions.rightHand &&
                                                      page.parent.pages.length > 1)) {
                                            bounds[1] = bounds[1] - width;
                                            bounds[3] = bounds[3] - width;
                        return returnBounds(page, bounds);
                        function returnBounds(page, bounds) {
                                  return [
                                            page.marginPreferences.top,
                                            page.side == PageSideOptions.leftHand ?
                                                      bounds[1] + page.marginPreferences.right :
                                                      bounds[1] + page.marginPreferences.left,
                                            bounds[2] - page.marginPreferences.bottom,
                                            page.side == PageSideOptions.leftHand ?
                                                      bounds[3] - page.marginPreferences.left :
                                                      bounds[3] - page.marginPreferences.right
               function selectIt(theObj) {
                        var myZoom = app.activeWindow.zoomPercentage;
                        app.select(theObj);
                        app.activeWindow.zoom(ZoomOptions.fitPage);
                        app.activeWindow.zoomPercentage = myZoom;

  • Is there a way to make a smart "playlist" of specific books in my iTunes library, and copy ONLY THOSE books to an iOS device? I own an iPad and an iPhone but I want different books on different devices.

    Is there a way to make a smart "playlist" of specific books in my iTunes library, and copy ONLY THOSE books to an iOS device? I own an iPad and an iPhone but I want different books on each different device. When I've tried this, the iOS devices don't seem to respond.

    There is no playlist for iBooks, butther eis nothing to preent you from choosing to download specific titles from itunes, or syncing just specific titles to an individual device.

  • Is there a script available to make an alternate size layout of a book?

    Hello:
    I was referred to this forum from this thread: How can I export a pdf of an InDesign alternate layout from a book?
    I have a book that is in a 6×9″ layout and I would like to make an alternate layout of the same content for 8.5×11 (and other formats).  I found out that I cannot create an alternate layout in a book and export just the layout, without including both sizes; I have to create a whole new set of book files.  Is there a script that can do this or at least do some of the heavy lifting?  It will need to take the current 6x9" format and make it 8.5x11" and also adjust the text frames for the larger size pages.
    Thanks for any help!
    Kevin

    Hi,
    I suggest looking here:
    http://gallery.technet.microsoft.com/scriptcenter
    It's highly unlikely that you'll find something pre-written that will meet all of your requirements, but there should be enough in the repository to give you a starting point.
    EDIT: If you're looking for someone to do all the work for you, you can try posting a request here:
    http://gallery.technet.microsoft.com/scriptcenter/site/requests
    I have no idea if anyone ever goes through these requests though (I know I don't).
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • Is there a way to make form org specific?

    Hello folks!
    Is there a way to make my custom form Organization specific.As in when first org users selects the org code from the find window ,the profile option should be set so that that all the info that they enter pertains only to that org.Its basically a way to set up the form so that it could be used across various orgs?
    If you can throw some light at this,I would appreciate it!
    Thanks much for your help!

    U can make the form org specific by fetching the organization id programmatically...U will need to override executeQuery method of your VO....Below will make things clear:
    Add the following where clause in your VO query:
    where ORG_ID=:1
    Override the execute query in VOIMPL,java as:
    public void executeQuery()
    OAApplicationModuleImpl oaapplicationmoduleimpl = (OAApplicationModuleImpl)getApplicationModule();
    OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)oaapplicationmoduleimpl.getOADBTransaction();
    if(isLoggingEnabled(1))
    writeDiagnostics(this, "oadbtransactionimpl.getBusinessGroupID():"+oadbtransactionimpl.getOrgId(), 1);
    setWhereClauseParams(null);
    setWhereClauseParam(0, String.valueOf(oadbtransactionimpl.getOrgId()));
    super.executeQuery();
    if(isLoggingEnabled(1))
    writeDiagnostics(this, "getRowCount:"+getRowCount(), 1);
    Edited by: 856716 on May 10, 2011 5:59 AM

Maybe you are looking for

  • ExportData exports to the wrong folder

    I have xml of my data being exported and imported to a mapped drive. When I do an import it pulls the xml from the mapped drive as expected. When I export the xml, it exports it to the desktop. I have both in the click events of buttons. I have the e

  • Satellite Pro A300D - What is the model number for the keyboard?

    My husband managed to dislodge a keycap on my keyboard, and broke the white scissor clip that holds hit on...(don't ask me how) He spoke to the authorised service centre here in Norway, and they sent us replacement scissor clips (actually they sent a

  • Is SSL required in order to sync a Iphone with Exchange

    Checking to see if someone knows if SSL is required for syncing Iphone with Exchange?

  • Need to Move contents of BLOB from database to middle-tier file system

    I need to be able to move the contents of a BLOB (which is a PDF file) from the database to a specified location in the middle-tier file system (running 9iAS). There does not seem to be the equivalent package or other built-in functionality to DBMS_L

  • Weblogic Performence Issue

    We have installed Weblogic Server 10.3.6 on a Oracle Linux x86_64 test server (5GB RAM) and Configured RTD and Webcenter in one domain.We are using single database for these two products, after starting Admin Server we are only able to start one mana