[CS3][JS] everyItem() and getElements()

I am trying to work out how everyItem() and getElements() work. In the following snippet I'm trying to get the top margin of every page to change, without using a loop. (I realise I could do this with masterpages, but that isn't the point of this exercise.) I'm unsure of the circumstances where I need to loop or which circumstances I can/should use everyItem() and getElements().
var myTopMargin = 25;
var myMarginPreferences = app.documents[0].pages.everyItem().marginPreferences; // This returns an array of marginPreference objects
with (myMarginPreferences) {
top = myTopMargin;
This didn't work.
I also tried:
var myTopMargin = 25;
var myMarginPreferences = app.documents[0].pages.everyItem();
with (myMarginPreferences) {
marginPreferences.top = myTopMargin;
Can anyone demystify the use of everyItem() and getElements()?
For example, expanding the above example, how do I get an array of all the top margin settings of every page?
var myTopMargins = app.documents[0].pages.everyItem().marginPreferences.top; // undefined result
Perhaps there is simply no need to do this? Should I just iterate through the items? (I come from an AppleScript background and this was always slower than obtaining all the information at once, which is where this question comes from.)
Thank you for your time.

I revive this thread just to mention an article which could help:
On everyItem() - Part 1 (introduction) : http://www.indiscripts.com/post/2010/06/on-everyitem-part-1
On everyItem() - Part 2 (advanced) : http://www.indiscripts.com/post/2010/06/on-everyitem-part-2
Regards,
Marc

Similar Messages

  • I have PS CS3 Extended discs and serial number but do not have a CD drive on my new computer.  How can I download it?

    I have PS CS3 Extended discs and serial number but do not have a CD drive on my new computer.  How can I download it?

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 | 12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.6| 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • Installing cs3 master collection and cs5 production premium on windows 7 machine

    I have a windows 7 ultimate machine that I would like to install CS3 Master Collection on. I would then like to upgrade the Production Premium programs to CS5.
    I have the install discs for both. Any suggestions for how to go about doing this would be greatly appreciated.
    Thanks!

    Tahseen,
    Thanks for the quick reply!
    Both CS3 Master Collection and CS5 Production Premium are full installs, neither is an upgrade. I have serial numbers for both.
    Machine previously had CS4 Production Premium installed on it, that has been uninstalled.
    Should I install CS3 Master Collection then install CS5 Production Premium? If so, do I need to remove the CS3 versions of programs included in Production Premium before installing CS5 Production Premium?
    Thanks again!

  • After system restore CS3 stopped working and can not be uninstalled

    I did a system restore (W7) and my CS3 apps stopped working with the message "Licensing for this product stopped functioning. Currently you cannot use this product. Solve this problem by uninstalling and reinstalling or contact support." I tried to uninstall but the installation manager returns a list of applications with red X and "unsuccessful" next to it. Reinstalling it from the dvd  returns: "Installation error, can not continue. Contact support. Internal error 2739". I do not really want to reinstall the whole system since other Adobe applications (PS CS6) work just fine.

    Try using the Cleaner Tool
    Adobe Creative Suite Cleaner Tool
    helps resolve installation problems for CS3 thru CS6 and for Creative Cloud
    http://www.adobe.com/support/contact/cscleanertool.html

  • Reinstall and reregister InDesign CS3, Acrobat 9 and Photoshop 7

    I just lost my Dell Latitude Laptop and my office Desktop computers, thanks to Sandy. Now I must reinstall Adobe Indesgin CS3, Acrobat 9 and Photoshop 7; as well as Windows XP and MS Office Pro 2003. What can I do to make the re-registrations of these products go smoothly, i.e. not take a week?

    Not sure what you are trying to say. You need to properly reinstall them. Downloads can be found here for most legacy products:
    Direct Download Links for Adobe Software
    Activations can be reset by calling support. there is no need to re-register. If you did once, all the info is on your Adobe account already.
    Mylenium

  • Indesign cs3 for table and figure

    In Indesign cs3 for table and figure automation scripts
    Tables - auto align and place near citation
    Figures - place near citation with caption
    Its urgent

    ok, well, you may want to ask a question, rather than just stating what you need to do. also, people are helping you for free, so writing it's urgent won't get you very far.

  • CS3 javascript XML and attribute adding.

    I've been trying to get something working in CS3 javascript XML for some time and it is getting really frustrating.
    Say I have:
    var someXML = new XML("<anElement/>");
    someXML.@xxx = "something";
    $.writeln(someXML.toXMLString());
    gives the output I'd expect (<anElement xxx="something"/>);
    But I need the name of the attribute to be dynamic.  As far as I can see I should be able to either:
    someXML.getAttribute("xxx") = "something";
    or
    someXML.@["xxx"] = "something";
    both these cases give an error of 'Cannot set property xxx'.  I'm using CS3 version 5.0.4 (the debug build because most of the time I'm working directly with the API - not through scripting).
    I looking for ideas to try...
    Ian

    Hi Ole, thanks for the reply.
    I am aiming to manipulate XML using standard javascript functions - nothing directly to do with indesign, though other parts of the script does interact with it.  Basically the scripts allow a user to set some configuration options and that is in an XML string format (if it was the indesign XML Hierarchy XMLElements, etc I'm pretty sure I could get things to work - worst case I could add to the scripting support in a plugin and make it work...).
    I had an idea (driving home after a frustrating day), Since the XML I'm processing is small, I can move forward by crudely making a string from the XML object, inserting the attribute into the string and then re-new'ing the XML object.  With large comments about why - unless someone can come up with a reason/fix for the javascript-XML not working (I suppose it may just be the number of InDesign/Extendscript versions I have installed - CS2/CS3/CS4, indesign and server).
    Ian

  • I purchased adobe cs3 by download and have documents that no longer connect me with the site to re-download.  How can I access my purchase to download again?

    I purchased adobe cs3 by download and have documents to prove purchase that no longer connect me to the site to re-download my purchase. I was forced to change from microsoft XP and to install Microsoft Windows. How do I access my purchase to download again on my computer now?

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #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).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #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!
    Thank you.
    <!-- VERY important to include-->
    <b>WARNING:</b> Do not run Firefox's uninstaller or use a third party remover as part of this process, because that could permanently delete your Firefox data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and saved passwords. <u>These cannot be recovered unless they have been backed up to an external device!</u>

  • Upgrading from CS3 to CS5 and changing PC

    I have CS3 Web premium running on Windows XP machine. I want to migrate to CS5 but also to migrate the desktop to Windows 7. Will I have to first re-install CS3 on the re-built machine and then upgrade to CS5 or is it just a case of deactivating CS3, installing CS5 and activating the new copy?

    No, you don't have to install CS3 to use the CS5 upgrade. Have the disks and serial numbers handy.
    If you're removing CS3 from another PC then deactivate it first.
    Finally, if there's any chance you'll need CS3, then install it on the new Win 7 machine. It will run just fine.
    I have CS3, CS4 and several CS5 apps all running quite nicely on Win 7 Ultimate 64 bit.
    Bob

  • CS3 on Mac and OS X Yosemite 10.10  How do I reach customer support?

    I'm running Photoshop CS3 on Mac and updated to OS X Yosemite 10.10  I now get a licensing stopped working alert.  It says I need to uninstall and reinstall or contact Adobe customer support.  How do I reach customer support?

    Adobe does not support CS3 at all.  Adobe will not give you the time of day.
    Your best bet is to get advice from users here who use CS3 under Yosemite—but you won't fine many of those.
    I you do a forum search, you'll see many users who have been advised to downgrade to Mavericks.

  • I have a CS3 for windows and I switched to a mac.  Can I get a mac version without having to pay for the suite again

    I have a CS3 for windows and I switched to a mac.  Can I get a mac version without having to pay for the suite again?

    No.
    Adobe only offers a Platform Swap on current software: Order product | Platform, language swap
    CS3 is also too old to have an "upgrade path" and is no longer sold or supported by Adobe.
    You do, as a CS3 owner, qualify for a 40% discount on your first year of a Creative Cloud Subscription though: Creative Cloud pricing and membership plans | Adobe Creative Cloud
    If you don't want to go with the subscription service, Adobe does still offer CS6 (4 versions away from current & no longer receiving updates) as a "one time payment/download" perpetual license: Creative Suite 6

  • Dreamweaver CS3, IE 7 and MCMS

    To all,
    Have an issue with Dreamweaver CS3, IE 7 and MCMS. Appears
    that when a user goes to edit a site, the toolbars disappear. We
    reloaded IE 7, attempted to troubleshoot with Microsoft the CMS
    application and finally re-imaged the user's machine with an in
    house company produced standard image. The user's were able to work
    with CMS until an install of Dreamweaver CS3 was done. Now the the
    issue of the missing toolbars has returned.
    Two other user's in the same group installed Dreamweaver MX
    2004 and have not experienced any problems at all. Are there any
    open issues with Dwvr CS3, IE 7 and MCMS incompatibility?
    Thanks for your help.

    Actually you have other problems on that page -
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    </head>
    <embed src="AC_RunActiveContent.js" width="0" height="0"></embed>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Y'a quelqu'un l'aut'bord du mur</title>
    <style type="text/css">
    <!--
    body {
    Note the duplication of head content (in bold).  Change that to this -
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Y'a quelqu'un l'aut'bord du mur</title>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    <style type="text/css">
    <!--
    body {
    and see what happens.

  • InDesign CS3 - CS4 compatibility and backwards compatibility

    About to purchase InDesign CS4 for the PC. A colleague in the non-profit association I will be sharing projects with uses CS3 on a Mac.
    Are there any issues with us exchaning InDesign files from CS3 -> CS4 and from CS4 -> CS4?
    Regards
    Ian

    CS3>CS4...usually no problems, you can use InDesign´s native file format indd. You may have some difficulties with fonts if you transfer files from Mac to Win or vice versa. Specially with some older non-open-type fonts. You can´t use same font with both OS, so you must have own versions for Mac and Win. And they will not always match perfectly.
    CS4>CS3 works if you export your file to INX format. You will face some problems if you have used CS4 features that doesn´t exsist in CS3... and of course you may have issues with fonts too but that´s not really because of indesign. You will have same font issues with other softwares too, if you transfer files between Mac and Win.

  • My computer was refreshed and the technician did not deactive the CS3 license first and the drive has been wiped. I have my serial number, how can I get it activated?

    My computer was refreshed and the technician did not deactive the CS3 license first and the drive has been wiped. I have my serial number, how can I get it activated?

    Hi pipper88,
    You can reinstall CS3 and enter the serial number to activate the software.
    Regards,
    Rave

  • Reinstall of CS3 Master Suite and Photoshop CS5

    I recently had to reinstall my OS and now need to reinstall both CS3 Master Suite and Photoshop CS5.  Can I install Photoshop CS5 first since I use that every day?  And then later install CS3 Master Suite WITHOUT Photoshop?  Or do I have any reason to install them in order, i.e. CS3 Master Suite WITHOUT Photoshop and then CS5?

    I assume your Photoshop CS5 is the full retail standalone version?
    I see no reason why you cannot install Photoshop CS5 then Master Suite CS3 (and uncheck the Photoshop CS3 option when you tell the installer what to install).

Maybe you are looking for

  • How to call a Webdynpro view from BSP page (MVC) in a new window?

    Dear Experts, kindly advise how to call a webdynpro view from BSP application after performing an event (through button or hyper link). Regards, Sarat.

  • Use of recorded material in garageband

    How do I use old material in garageband that has been recorded with for instance adobe audition. I have a lot of recorded stuff in ses/wav files that I would like to import or use in Garageband.

  • Strong type cursor ISSUE Question.

    Hello I have qUestion - Why the strong type cursor during compilation check only the COUNT of values and if ALL types defined in RECORD exist in query? THIS IS STRONG TYPE CURSOR? A Can write code like below without compilation error! In this case wh

  • Copy to disk "c:" failed.

    I updated my itunes on my 64 bit windows machine, and now I can't sync up or back up any of my devices. The message is: Attempting to copy to the disk "c:" failed. You do not have enough access privileges for this operation. This has worked fine up u

  • WRT54GL Security problem

    First of all, I have two of the same routers.  One totally works, and the other one partly works.  The one that works, will hookup with or without security.  The one I am having problems with, will work ONLY without security.  Without security, it ho