I'm having trouble finishing up with Compound Paths

OK, I'm a novice here so here's my script. It works really well like it sits. It basically takes two objects in a large group and aligns them. I want to make each two objects combinded into a single compound path. I have tried multiple things and they all just kick out errors and what not. I can't seem to get my head around the vocabulary for the scripting but the darkness is starting to fade the more I do.
#target Illustrator
          var idoc = app.activeDocument;
          var pi =idoc.compoundPathItems;
          var numn = prompt ("How Many Names?", "Enter Number of Names");
          var dd = prompt ("How far below name is the number?", "Enter Drop Distance");
          var nH = prompt ("How tall are the names?", "Enter Name Height in Inches");
          dd = parseFloat (dd);
          numn = parseInt (numn);
          nH = parseFloat (nH);
for (j=0; j<numn; j++) {
                    var num = j + numn;
                    var numpath = pi[num];
                    var npath = pi[j];
                    var nName = 'name' + j;
                    var numName = 'number' + j;
                    var centWidth = pi[j].width / 72;
                    var centN = pi[num].width / 72;
                    var adjNum = (centWidth - centN) / 2;
                    var fhp = j*9.5*72;
                    var fvp = 0;
                    var nhp = (j*9.5*72) + (adjNum * 72);
                    var nvp = ((dd*72) + (nH * 72))*-1;
                    pi[j].name = nName;
                    pi[num].name = numName;
                    npath.position = [fhp,fvp];
                    numpath.position = [nhp,nvp];
// Would Like to combine the aligned items into a single compound item.

select few objects and try this to build up a new compound path.
#target illustrator
var doc = activeDocument;
var sel = doc.selection;
var newCompPath = doc.activeLayer.compoundPathItems.add()
if (sel.length > 0) {
   for (var i=0; i<sel.length; i++) {
        sel[i].evenodd = true;
        sel[i].move(newCompPath, ElementPlacement.INSIDE);

Similar Messages

  • HT4623 I  am having trouble finishing an update on my Iphone

    I am having trouble finishing the update process on my Iphone and consequently I am unable to receive my calls it will not accept my new password that I reset. PenSta

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico my first language is Spanish. I do not speak English, however I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    The apps in the iTunes App Store are only for the iOS devices. These apps do not run on Mac OS X. If the app exists for Mac OS X then it is a version created for the Mac and it will not run on iOS devises. If you want this app on your iOS device and on your Mac, you must buy both versions from their respective app stores.

  • I have a MacBook Air, OS 10.8.5 I am having trouble sending attachments with Mail. Even small (130K) files don't go. It tries to send then gives up. What can I do to fix this?

    I am having trouble send messages with attachments in Mail. Even small attachments (130K) Mail tries to send, then gives up and the message sits in my out box. How can I fix this?

    1. You need an external DVD drive.
    2. There are no Mac OS X applications or other software in the iTunes App Store.
    (116312)

  • HT204204 Having trouble to connect with bluetooth

    Why i having trouble to connect with bluetooth woth other smartphone? I  have already try to connect with bluetooth beetwen my iphone 4 with iphone 6 ? While my iphone 4 have already upgrade to ios 8

    never mind. I fixed it. After uninstalling and then reinstalling iTunes all start to work. Thanks anyways

  • There are text messages that I'm having trouble deleting.  With some of my text messages, I can swipe to the left and delete ... or press and hold, get more and delete to trash can icon. But there are some where neither will work. Can't delete. Help!

    There are text messages that I'm having trouble deleting.  With some of my text messages, I can swipe to the left and delete ... or press and hold, get more and delete to trash can icon. But there are some where neither will work. Can't delete. Help!

    But once again, I do not want to lose my other texts, app progress, and photos. I could sync the photos but i would still lose the app progress and texts. I would only restore if it was the only option left, but the other space, as already stated, isnt the main concern. The main concern is those 'deleted' texts. If they go, then a good size chunk of the other space goes. I know you CAN delete texts for good. It worked fine before. All i want to know is why its not working for me now, and how to fix it.
    I also know that when you delete texts on your iphone, they get marked for deletion, however they stay on your device (thats why they show up when you search for them.) then when you sync your device with itunes, the texts marked for deletion should disappear. When i synced they didnt disappear. Thats what i need an explanation/solution for. Why the texts marked for deletion didnt get fully deleted after the sync.

  • Having trouble accessing internet with new wireless WRT54...

    Having trouble accessing internet with new wireless WRT54G. Used easylink to read existing router BEFSR41 which works great to westell modem provided by Verizon. When connect new router Easylink configures WRT54G but when trying to connect to internet...fails. All lites indicate good. Not using wireless device yet, just the wired ethernet. Router set up as DHCP.
    I keep going back to old router and works great every time. Help! 

    Thanks for response, however I tried setting unit to 192.168.2.1 (leaving DHCP) to no avail. I put my old unit (BEFSR41) back in and I'm back up. I need to sit back and decide which way to go on this. Perhaps it's defective and I should return it.

  • I am having trouble syncing photos with lightroom mobile. Lightroom (on computer) tells me that it's syncing but nothing appears on my I pad. Any comments?

    I am having trouble syncing photos with lightroom mobile. Lightroom (on computer) tells me that it's syncing but nothing appears on my I pad. Any comments?

    however when I try to sync my older ipod with it and upload some new music to it, Itunes keeps telling me that all the previous songs will be erased
    Yes, that's correct. If you don't have the songs that are currently on your iPod also in your new iTunes installation, they will be erased from the iPod if you sync it. Best to start afresh by first transferring all the music on your iPod back to your new computer/iTunes library.
    For iTunes version 7 or later, then you can transfer purchased iTunes store music from the iPod to an authorized computer by using the "file/transfer purchases from iPod" menu. Note that the maximum of 5 authorized computers applies here.
    Find out how to do that here.
    How to copy iTunes purchases from an iPod or iPhone to a computer.
    For all other non purchased content (your own CDs etc), check out the instructions/suggestions here.
    Music from iPod to computer (using option 2). This a manual method using "hidden folders" and although it works, it is a little more involved than other methods.
    Much easier ways are to use one of the many 3rd party programs that copy music from the iPod to the computer.
    One of the most recommended is Yamipod. This is a free program that transfers music from iPod back to the computer. However, it does not transfer playcounts/ratings etc.
    Other free programs are Pod Player, SharePod and Floola.
    If you want to recover just the structure of playlists from the iPod (and not the actual song files themselves), there's iRepo for Windows. which I understand has this feature along with all the standard features for these programs.
    iPodRip also has the feature enabling you to reconstruct playlists.
    There is also CopyTrans. This does preserve ratings/playcounts etc if those are important to you but this program is not free. It also supports video transfer.
    Once all the music is safely back in your new iTunes library, you can sync your iPod as normal.

  • Having trouble getting started with my new shuffle

    I am having trouble getting started with my new shuffle. any help?

    Hey there Feisty59,
    It sounds like you have a new iPod Shuffle, and want to know how to start using it. Here is a great resource for understanding how to use your iPod, and how to set it up and get music synced to it from iTunes:
    iPod shuffle User Guide
    http://manuals.info.apple.com/MANUALS/1000/MA1550/en_US/iPod_shuffle_4thgen_User _Guide.pdf
    If you have a different model of iPod Shuffle, choose yours from the following page and use that guide instead:
    Apple - Support - Manuals
    http://support.apple.com/manuals/#ipodshuffle
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • I am having trouble logging in with my password on the macbook

    I am having trouble logging in with my password on the macbook, I know it's right and I just can't log in. Please help!!

    Reset password.
    OS X 10.7 Lion, 10.8 Mountain Lion, 10.9 Mavericks and 10.10 Yosemite
    Reset Password
    Start the computer,then press and hold down command and R keys to start into recovery partition.
    When you see the Apple logo, release the keys.
    Wait until  OS X Utilities window shows up.
    Move the mouse to the menubar at the top and click "Utilities", then select "Terminal"
    from the drop down.
    Terminal window will appear.
    Type in   resetpassword   and press enter on the keyboard.
    Leave the Terminal window open.
    Reset Password Utility window will open with Macintosh HD selected.
    Select the user account from the popup menu box under “Select user account”.
    Enter a new password.
    Reenter the new password for the user.
    Enter a hint.
    Click the "Save" button.
    Click  in the menubar and select Restart.
    Log in.
    If Keychain dialog box appears, select “Create New Keychain”.

  • I'm having trouble sending mms with my iPhone 3GS

    I'm having trouble sending mms with my iPhone 3GS

    This also happened to me after update to IOS 6. So probably it is cause your email outgoing stopped to work.
    So check your outgoing settings and you probably will solve the issue.
    Hope it will be helpful

  • I've reset my iPhone 3GS and I'm having trouble activating it with an old SIM card

    I've reset my iPhone 3GS and I'm having trouble activating it with an old SIM card
    I just would like to activate it so I may use it as an iPod I have the iPhone 4s now... HELP

    What trouble are you having?
    If there is an error message, what is the exact wording of that message?

  • I'm working in Photoshop CS6 on a Mac and am having trouble when I select a Path it automatically feathers the selection border. I can't seem to find any place to adjust a feather setting. Does anyone have a suggestion? I'm using paths to silhouette an im

    How do I change a default from feathered edge to sharp edge when I select a path?
    I'm working in Photoshop CS6 on a Mac and am having trouble when I select a Path it automatically feathers the selection border. I can't seem to find any place to adjust a feather setting. Does anyone have a suggestion? I'm using paths to silhouette an image on a photograph to use in another document and I need a hard edge on it, not a feathered one.

    In the Paths panel, click the flyout menu (in the top right of the panel) and choose Make Selection (this option will only be available if you have a path selected). Reduce the Feather Radius to 0 (zero) and click OK. This setting will be the default even when clicking the Load Path as Selection button.

  • Having trouble connect consistantly with websites, clear history then it works and an hour later, need to do the same thing (clear history to connect)

    Just purchased new laptop with Windows 8, loaded firefox for browser as have always used in other computers. Am having trouble accessing websites, for example when I go to my gmail gmail.com, an error comes up that it can't access the website, check connections. But if I go and clear history, includidng the cache, then close Firefox and reopen and then try it works. Then I'll move onto other things and go back and it still works. Not sure what is the trigger, but when I try to go back to my gmail for example.(as it happens on other sites as well, my banking, my facebook, etc) I get that error again, I then have to again clear history,...then everything works!!! It's very frustrating as I have to clear history at least a dozen times per day! What is happening!

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox and any leftover program files and then reinstall Firefox. Please follow these steps one by one:
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu) and confirm all upcoming messages.
    #Now, uninstall Firefox by following the steps mentioned in the [[Uninstall Firefox from your computer#w_uninstall-firefox|Uninstall Firefox]] article.
    '''IMPORTANT:''' On Windows, the uninstaller has the option to remove your personal data and settings. Make sure that you do '''not''' check this option; otherwise all of your bookmarks, passwords, extensions, user customizations and other Firefox [[Profiles|user profile data]] will be removed from your computer.
    After uninstalling Firefox on Windows, delete the "Mozilla Firefox" program folder, located by default in one of these locations:
    * '''(On 32-bit Windows)''' ''C:\Program Files\Mozilla Firefox''
    * '''(On 64-bit Windows)''' ''C:\Program Files (x86)\Mozilla Firefox''
    #Go to the Windows Start menu and click on "Computer".
    #In the Explorer window that opens, double click Local Disk (C:) to open the C:\ drive.
    #Find the "Program Files (x86)" folder or "Program Files" folder.
    #* On 32-bit Windows, double-click the '''Program Files''' folder to open it.
    #* On 64-bit Windows, you will see a "Program Files (x86)" folder AND a "Program Files" folder. Open the '''Program Files (x86)''' folder.
    #Look for a '''Mozilla Firefox''' folder. If you find one, right-click it and select ''Delete'' and confirm that you want to move the folder to the Recycle Bin.
    Now, go ahead and reinstall Firefox:
    #Double-click the downloaded installation file and go through the steps of the installation wizard.
    #Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • I am having trouble starting Indesign with the folio builder panel

    Every time I start indesign and change my tools to the DPS tool set the folio builder pannel flickers and then disappears and then indesign shuts down.
    I had some success deleting the preferences files but need a long term fix. Any thoughts?

    Well yes, of course you are having trouble using MobileMe because MobileMe no longer exists and has not existed for the last 2 years at least.
    MobileMe has been replaced by iCloud, so you will never be able to use MobileMe because it does not exist.
    Also, I would suggest that you look more closely before you post, because you have posted this in an iPhone forum and this question has nothing to do with iPhones.  You would get more help if you posted in the correct forum.

  • I'm having trouble losing sync with yahoo calendar

    Is anyone else having trouble with yahoo calendar?  It used to work consistently, but now it stays in sync for a while and then goes out.  I've tried contacting Yahoo support, but they say that they've told me everything they know and I have to work with Apple.  Of course, my support has expired, so now what do I do?
    In order to get sync back, I have to delete my Yahoo account from my iPod and then re-add it.  It stays in sync for a while and then goes out again.
    This started happening after iOS 5 came along.

    It just just says, "A problem occurred.  The webpage couldn't be loaded.

Maybe you are looking for

  • Help!  I need to have hotspots in a slideshow.

    Okay, here is where I'm at, and I really need some help.  Background information: I have Flash CS4, but the tutorial I used to create this used Action Script 2.0. Here is a link to what I have... http://atleventguide.intuitwebsites.com/ Click on "ins

  • Help with iTunes library on external hard drive

    Hi! I have a new computer and I don't want to put anything in it but the programs I need. When it comes to movies, music, etc. I have an external hard drive. Now, I want my iTunes to read the music from that hard drive, and, when I download something

  • Embedded video failure warnings

    I am being flooded by warnings about 10.10.3 (or something in Safari) not being able to show embedded YouTube videos. I assume these are flash videos and I have the up-to-date flash player in system preferences so the videos always play. How can I st

  • External service order-pm03

    Hi, What are the step sin preparing external service order-pm03 a .with manpower b. with stockable items c. non stockable items d. how the cost sceanario to be captured. RSV

  • How to send  Million records using  Open hub using  into my own file server

    hi i am using OPEN HUB process to send  6 miilion record to my own network server. is there any limitaiton how i need to go about that? my process is failing when i execute DTP openhub. i am abel to send few records to sap aplication server. did any