Select ungrouped items, change opacity and save

Hi, I am a javascript beginner trying to create a script to do the following to several . ai files, one at a time:
open document
select all items
change opacity to 40%
select all grouped items
change opacity to 100%
save and close
This is what I have so far which I know only affects the opacity of one layer, but if anybody has any tips for what I can do next, it would be greatly appreciated.
for ( i = 0; i < app.documents.length; i++ ) {
    var targetDocument = app.documents[i];
    var layerCount = targetDocument.layers.length;
        for (var ii = layerCount - 1; ii >= 0; ii-- ) {
            targetLayer = targetDocument.layers[ii];
            var layerName = new String( targetLayer.name );
                if ( layerName.indexOf("TEST") == 0 ) {
                    targetDocument.layers[ii].opacity=40.0;
targetDocument.close;
targetDocument = null;

You don't select in script but does this do what you meant?
#target illustrator
setObjectOpacity()
function setObjectOpacity() {
    var doc = app.activeDocument;
    for ( var i = 0; i < doc.pageItems.length; i++ ) {
        doc.pageItems[i].opacity = 40; // This will do everything
    for ( var i = 0; i < doc.groupItems.length; i++ ) {
        doc.groupItems[i].opacity = 100; // Put this back
        for ( var j = 0; j < doc.groupItems[i].pageItems.length; j++ ) {
            doc.groupItems[i].pageItems[j].opacity = 100; // Put these back too

Similar Messages

  • On transaction FBL3N  report change layout and save layout icons  not activ

    Hi,
    I am working on upgrade project from 4.6C to ECC6.0. On transaction FBL3N  report change layout and save layout icons  not active; only select layout icon is active.
    Please advise how these two icons can be activated.
    saeed

    Hi,
    The object F_IT_ALV has a field, the activity ACTVT, which can
    contain four permitted values: 01, 02, 03 and 70.
    Activity 03 corresponds to the minimum authorization, which is the
    most restricted one: You can only select layouts which have
    been configured already. In particular, all of the other functions
    named above are inactive with activity 03.
    I guess that your user-id have set activity 03 for this object.
    The SAP notes 374656 and 409190 are recommended.
    So, if the values 01 and 02 are not included, then
    the user can't change and save layouts.
    For the line item display in FI the authorization
    object FI_IT_ALV has been created as an extra security check in addi-
    tion to the ALV authorization object S_ALV_LAYO.
    Please check note 374656 where you should be able to find
    relevant info about this. Also note 637554 should be helpful.
    Regards,
    Aidan

  • FBL3N  change layout and save layout icons  not active

    Hi,
    I am working on upgrade project from 4.6C to ECC6.0. On transaction FBL3N  report change layout and save layout icons  not active; only select layout icon is active.
    Please advise how these two icons can be activated.
    saeed

    You are missing an authorization object in your user profile.  Run FBL3N and then run SU53 to see which auth obj is missing.  Then send those details to your Security.

  • My ibook keeps shutting down completely with the date to reverting back to 1969.  i restart only after i plug in charger it lets me, then change date and save.  the next time i use same thing happens, safari, iphoto, email are the only ones i have used.

    my ibook keeps shutting down completely with the date to reverting back to 1969.  i restart only after i plug in charger it lets me, then change date and save.  the next time i use same thing happens, safari, iphoto, email are the only ones i have used.
    please help!  i am at a loss here.
    thank you, movie lady
    ibook g4

    The iBook does not have a backup (PRAM) battery. It only has the main battery and a small capacitor which maintains the settings long enough to do a battery swap. If the battery is dead, what you are seeing can happen.
    If the battery is not a problem (or even if it is), you could try resetting the PMU and see if that helps.

  • How to select a item form listbox and insert it into combo

    i want to select a item from listbox and display it in combo ,how realize ?
    and how to insert a vi into a subpanel and excute?
    everyone's help will be appreciated 

    Hello,
    to add in Listbox selected item to Combobox see attached Vi. With the other part of our question must help someone other because I never did it.Message Edited by ceties on 10-18-2006 04:57 AM
    LV 2011, Win7
    Attachments:
    Insert.vi ‏20 KB

  • Simple question: I placed a document in iCoud on my iMac and it appeared on my iOS devices. If I change it on my iPad it changes on my iMac. Now, how do I change it and save it on my iMac so it automatically changes on my iOS devices?

    Simple question: I placed a document in iCoud on my iMac and it appeared on my iOS devices.
    If I change it on my iPad it changes on my iMac.
    Now, how do I change it and save it on my iMac so it automatically changes on my iOS devices?

    Welcome to the Apple Community.
    I have seen previous versions mentioned in a pop up message before on iCloud.com, but I'm not really sure at all how it would help, as I couldn't get it to do anything.
    The best advice I have at this time is to back up your work on your iOS device by regularly saving it to iTunes, if anything goes wrong you can then either load it into the numbers app again on the device or recover it via iTunes on your computer.
    My syncs are immediate, I never get chance to see if it works in the background, sorry.

  • Changing opacity and flow by taping numbers on a Macbook Pro Retina.

    Hi everyone,
    it is surely a easy answer but i can't find a way to change opacity by taping numbers on my Macbook Pro Retina (French version AZERTY).
    I think the problem comes from the fact that i don't have a numeric keypad.
    For instance, on the brush tool, if i enter 1 (by pressing shift+&), i change the flow to 10% and so on, but i didn't find a shortcut to change the opacity.
    On the move tool, if i enter 1 (by pressing shift+&), the opacity of the active layer don't change.
    I am nearly sure that the problem comes from the Macbook Pro Retina keyboard, so do i have to buy a additionnal numeric keypad ?
    Regards.

    What version of photoshop are you using?
    Is your version of photoshop also french?
    Actually i don't think you should need the numeric keypad.
    Added:
    Maybe your right about needing the numeric keypad after all.
    A quick test in cs6 seems to indicate that.
    You might also ask over on the french forum:
    http://forums.adobe.com/community/international_forums/francais
    Message was edited by: R_Kelly

  • Sales Order Item Change Date and delta flag

    is there a field for Sales Order Item Change date in MC11VAOITM?
    Also is there a flag that tell if a record is a delta or not once it is extracted to BW?

    You may be aware, any changes to a document will be recorded in CDHDR (for header changes) and CDPOS (for item changes).  You can explore these two tables.
    thanks
    G. Lakshmipathi

  • Changing view and save memory ?

    Hello.
    I've a program where you could change often your view. I don't use NavigationController or TabBarController to have a customizate interface. I only have several ViewControllers.
    So, when I wanna change view, I call the method
    [self.view addSubview:secondViewController.view];
    But now, I realize that if the secondView call
    [self.view addSubview:firstViewController.view];
    and If you repeat this a lot of times (of course I don't only have two views, otherwise I could call "self.view removeFromSuperview"), there are a lot of view running in background of the actual view (I suppose, tell me if I'm wrong).
    So, is there a way to remove the first view after calling the "addSubview" method ?
    Or is there a way to tag a view in order to refind the tagged view when I want, from where I want ?
    Thank you for the answers

    [firstViewController.view removeFromSuperview];

  • With a wired keyboard and a 2014 iMac I cannot select multiple items which are not next to each other

    I have recently changed from Windows 7 desktop to a new iMac running Mavericks.  I have chosen a wired keyboard as I like  the usual Delete key function.
    I cannot find out how to select several items which are not next to each other (e.g. words in Pages).  The well known method in Windows, which is repeated in the the Apple Finder Help screen, does not work.  Would be grateful for advice

    Hi JBowfin,
    If I am understanding your question correctly, I believe that I have an article that will address this question for you:
    Mac OS X 10.0: Use Command Key to Select Multiple Items in List and Column Views
    http://support.apple.com/kb/TA20396
    Take care, and thanks for visiting the Apple Support Communities.
    -Braden

  • How to drag and drop item from list to another item in list and change their positions

    I have a list field with multiple items. I want to select one item from list and drag and drop to another item in the list
     after drop item on another item the position of items should be change. (Example:- if I select 1st item from list and drag and drop this item to 4th item in list after drop that item position of both item should be changed 1st item on 4th position and 4th item on 1st position)
    I don't know how to do this.Please help me to find the solution.

    Hello Zoltan,
    I do not believe that kind of option is built into the listboxes, but I was able to have similiar functionalities using property nodes. I have included an example program that I put together.
    The big difference is that instead of dragging, you double click on the item you want to transfer. To highlight items as you go down the list, all you need to do is set the value to that list number.
    Hope this helps you out!
    Attachments:
    Temp.vi ‏33 KB

  • How to change and save a new file in Edge web Lumira server for Team ?

    Hi Lumira folks,
    I've installed SAP Lumira 1.0, Edge edition and View a sample 'Dairy Wholesaler-Sample"
    I'd like to change it and save as new file, but "Save" button is disabled and when I put my mouse over the button,
    it says "Save Option is disabled in this version".
    Is there any idae how to change and save as a new file in Lumira Edge ?
    Many Thanks.
    JH

    I've just found the reason as below.
    http://scn.sap.com/community/lumira/blog/2015/03/20/lumira-server-for-teams-edge-edition-version-compatibility
    The current version of Lumira
    server for teams is 1.0. This version uses Lumira 1.22 as its 'engine' as this
    was the version of Lumira Desktop that was shipped at the same time.
    Hence with the current Lumira
    version compatibility; namely that a newer version of the product can open an
    older document, but an older version cannot open a newer document, care must be
    taken when deploying Lumira server for teams.
    Lumira server for teams is only
    compatible with Lumira desktop 1.22. If you intend to deploy Lumira server for
    teams, ensure your desktop users do not move to a later version of the desktop.
    Content created in a later version of Lumira desktop can be uploaded and shared
    via Lumira server for teams, but it cannot be viewed or edited online in the
    browser.
    Ensure desktop users disable the
    auto update capabilities in the desktop preferences, and set the update to
    none.

  • Selected list items to Word document

    I found online many posts to generate a word document with all items included in a list.
    But is is possible to have the generation triggered by the user and to include only a subset of the list items?

    Hi  ,
    According to your description, my understanding is that you want to generate a word document with selected list items in your SharePoint 2010.
    You should look into the Word Control Toolkit, which uses the Open XML format SDK to achieve what you require.
    The basic functionality is that you use the Edit Control Block on a selected list item to generate and populate a Word document using a template you can select from a drop-down list.
    Here's some links to get you started:
    Generating Documents from SharePoint Lists with Open XML Content Controls
    http://blogs.msdn.com/b/ericwhite/archive/2009/10/14/generating-documents-from-sharepoint-lists-using-open-xml-content-controls.aspx
    Word Content Control Toolkit (Codeplex)
    http://dbe.codeplex.com/releases/view/5508
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Can't select multiple items with shift key os 10.7

    I can use command A to select all, and I can select multiple items with command and individually clicking each one, but not using Shift and clicking on the first and last items.  Any ideas?

    You need to display the window in column or list view. Shift-clicking items won't do that in icon view.
    (64793)

  • HT3819 can you select the items you don't want your family to be able to see?

    I want to get some of my dad's songs he has on his ipod without buying them so i was going to try using the home sharing but i dont want to share all of my songs. Before i turn home sharing on i would like to know if i can select the items i want and don't want my family to be able to see

    I really do appreciate everyone's input to my question. I guess what I wanted to do, and how it can be done aren't as simple as I had hoped. But I know what will work now. Thank you again and have a nice holiday season.

Maybe you are looking for