Move a selection of items on the page

I have a rectangle is selected. I want to run a script that simply sets the coordinates X and Y of the rectangle, in other words, out of the place where it is currently stuck on this page to another location specified by the script (on this page). I tried the following, but nothing happens:

App.Selection [0] .geometricBounds [1] = 2.0;

App.Selection [0] .geometricBounds [2] = 7.0;

My page size is standard 8-1/2 "x 11".

Also later, I need to copy this object and place the copy somewhere else on the page. I am new to scripting, the pointers to get started me would be greatly appreciated. Thank you!

App.Selection [0] .geometricBounds [1] = 2.0;

The real problem here is that, once you dereference element [1] table geometricBounds, it loses its connection to the DOM and you want to set just an anonymous array to 2.0 element. You must set all geometricBounds only once, as was illustrated in a solution of Jongware.

Now, what should I do if I have a collection of objects that is selected? How to find the center of this collection? What I have to loop through all the objects and keep track of the minimum and maximum x and Y? I want to spend the entire collection to a new X and Y from the center of the collection.

Objects are on different layers, so I can't group without losing the distinctions of layer.

Yes, you must do it manually.

You can loop through them and follow their minimum details.

You can also duplicate, group them and follow the Group (maybe will interrupt the text wrap).

Tags: InDesign

Similar Questions

  • You will return the "Select an element in the page" button right in Inspector?

    The 'select an element on the page' is to the extreme left now. Since ver.32 FF. As seen in this image:
    https://MDN.mozillademos.org/files/8315/Inspector-select-element-fx32.PNG
    Change for the worse in my opinion. You will return it right into the next version? Thank you.

    N ° it is always on the far left in the current construction of 35.0a1 of Firefox.

    All Toolbox items are on the far right, including the gear button options to define what items to display.

  • Delete the last item on the page with some scriptlable

    Hi @ all,

    I'm trying to solve the following problem, I hope one of you can help me:

    Import xml files into a database in InDesign (CS 5.5, Windows 7) to get a full product catalog.

    Before each product group is inserted a subheadline (separate textframe with scriptlable 'katalog_untergruppe'), but in the case of a page break, it's the last item on a page.

    Can I somehow, select these elements and remove them with a script in the InDesign document?

    I tried to do on objects on each page of counting and remove the frame if there a number higher than 40, but the number of objects is different, so sometimes necessary frameworks are deleted and some are still there.

    So I need to check if it's the last item on the page. Any ideas?

    Here my test:

    function test() {}

    for (var i = 0; i < document.allPageItems.length; i ++) {}

    If (document.allPageItems [i] .label! = "") {}

    PAGESTART

    If (document.allPageItems [i] .label == 'katalog_untergruppe') {}

    var n = 1;

    While (document.allPageItems [i + n] .label == "") {}

    n ++ ;

    }

    if(n>40) {}

    document.allPageItems [i] .remove ();

    }

    }

    If (document.allPageItems [i] .label == 'katalog_untergruppe' & & document.allPageItems [i + 1] .label == 'pagestart') {}

    document.allPageItems [i] .remove ();

    }

    }

    }

    }

    test();

    Thanks in advance :-)

    * Rike *.

    @ Jump_Over

    This does not work either, sometimes now other executives of related texts are deleted.

    With the help of someone else in combination with yours, I have now found a working solution.

    Search for the item lowest, if it is marked "katalog_untergruppe", delete it.

    Thank you very much.

    @Hans

    Sorry for not posting a file, but I'm not allowed to.

    @all

    Here a script to work for the problem, it is perhaps useful.

    function test() {}

    for (var i = 0; i)< app.activedocument.pages.length;="" i++)="">

    currentPage var = app.activeDocument.pages [i];

    var lastpageItems;

    for (var j = 0; j)< currentpage.pageitems.length;="" j++)="">

    var currentpageItems = currentPage.pageItems [j];

    If (j == 0)

    lastpageItems = currentpageItems;

    ElseIf (currentpageItems.geometricBounds [0] > lastpageItems.geometricBounds [0])

    lastpageItems = currentpageItems;

    }

    If (lastpageItems.label is "katalog_untergruppe")

    lastpageItems.remove ();

    }

    }

    test();

  • Header download for the 'sent items' folder did not complete. Cannot select "Sent items" on the IMAP server. Error number: 0x800CCCD2

    original title: error number: 0x800CCCD2

    Can anyone help with this issue:

    Header download for the 'sent items' folder did not complete. Cannot select "Sent items" on the IMAP server. You could try refreshing your folder list to synchronize with the IMAP server. Account: 'AOL', server: 'imap.aol.com', Protocol: IMAP, server response: "SELECT failed", Port: 143, secure (SSL): no, error number: 0x800CCCD2

    Thank you!

    Hi again Steve - I have spent a lot of time on the phone this morning to Dell technical support. the accompaniment of the victim and I did a lot of fiddling around with various options of Windows Mail and I don't know exactly what we were doing, but the issue seems to have resolved itself! Thank you for your time and trouble.

    Best, Douglas

  • "Unable to select"Sent items"on the IMAP server.

    I am trying to set up Windows Live Mail, but when I send a message, I get the error message "Cannot send or receive messages on behalf of Aol."  Header for the "sent items" download did not complete.  Cannot select "Sent items" on the IMAP server.  Try to update the list of folders, and then try again. "I can't understand what they mean on the"folder list ".  What should I do?  Thank you.

    Thank you for visiting the Microsoft Answers site.

     
    The question you have posted is related to Windows Live Mail and would be better suited to the Windows Live community. Please visit the link below to find a community that will support what ask you:
     
    http://windowslivehelp.com/product.aspx?ProductID=15
  • Impossible to select multiple items in the list box

    I use Acrobat 9.0 Standard.

    I added a list box in the PDF format and I want to give people the ability to select multiple items in the drop-down list. In properties, on the Options tab, I chose 'multiple choice '. But I am unable to make multiple selections despite this. It still only allows me to make a choice.

    Any ideas? Is there some other step I'm missing?

    I need help with this ASAP for my business - any suggestions are appreciated!

    Thank you

    It should do that if you hold down the SHIFT key.

  • Info session not showing all the items on the page

    Hello world

    Apex 4.2.5.00.08

    Need to check a mental health, went to check the values of session of an item on a page and only the PK element was on the list in the State of Session window.  See the list of items on the page by using the tab elements and they are all there.  Page source checked and yes they have values

    < snip >

    "" < td align= "right" >< label for= "P174_DESCRIPTION" tabindex= "999" >< a class= "option-w-help" href= "javascript:popupFieldHelp('1261598755721459294','2188531882820')" tabindex= "999" >default< /a > </ label > <table > ""

    < / snip >


    Still this hidden item is displayed in the window of session state

    < snip >

    < input type of =" hidden " name =" p_t28 " ID = " P173_COMPONENT_COUNT " " value =" 0 ">

    < / snip >


    and I don't mean tha the value is missing, but the real thing is not on the list of issues


    Thanks for your help.


    Gary


    When you inspect the session state?

    How and when are the set of values of item?

    See this current thread for what seems like the same problem: The State of Session items that are database columns

  • Select and move items on the page...

    Hello world

    We are currently working with InDesign CS3 documents. I have to select all the items on each page and move it with 9 pts both both horizontal than vertical position. If it's a recto page movement-9 pts and if it's the back page must move + 9pts. So what I do is, try to select all items in page and do it in a group. After this should get the geometric limits of the Group and move it in 9 pts. I got an error when doing my selection in the group. Find the script below

    //------------------------------------

    var doc = app.activeDocument;

    var mySelection is doc.pageItems.everyItem () .select ();.

    var myGroup = doc.groups.add (mySelection);

    //------------------------------------

    can anyone give in this help me. Also suggest me if there is a better way to do it.

    Concerning

    Indana

    Try this:

    var dx = 9, u = 'pt';
    
    Object.prototype.offsetX = function()
         {
         if (this.parent.constructor != Page) return;
         var sgn = 1 - 2*(this.parent.documentOffset%2);
         this.move(undefined,['' + sgn*dx + u,0]);
         }
    
    var items = app.activeDocument.pageItems.everyItem().getElements();
    var obj;
    while(obj=items.pop()) obj.offsetX();
    

    Marc

  • In labview so I select all items in the drop-down list, the corresponding elements of the need to change page

    as an example of

    If I select the first item - drop-down box, in the page it should only show digital controls 1 and 2

    If I select the second element - drop-down box, in the page it should show only digital commands 3 and 4

    If I select the third element - drop-down box, in the page it should only show digital controls 5 and 6

    because i really new for the labview.

    None of the answers thank you.

    There you go

  • In Movie Maker, a window runs off the page and can not happen to button publish

    For example, when you go to publish a movie using Windows Movie Maker the lower part with the button publish runs at the bottom of the screen and you have to move the page to the top to access. Equipment: Screen SONY Bravia KDL 32S 2000 native resolution 1366/768. Nvidia graphics card GeForce 8500 GT set at 1360/768

    David, I found the easiest way. Click on adjust font size (DPI), password or continue right click the desktop click Customize, and then select the default 96 DPI and click on apply and were good. Sorry I forgot that I did set it to 120 DPI.

    Thanks for the help.

    RickS

  • How to lock the top items on the page?

    Hello world

    I am a new user (in trial version) to Muse and despite the fact that I did the tutorial, I can't locked on the top of the page items where users scroll as in this page: Menu | Katie Bakery Café (Logo Katies + Menu and the second part also locked lunch/dinner...)

    Could you explain to me how can I do?

    I think the real problem is that I do not understand the difference between the top of the Page / header and the bottom of the page / footer...

    Could you explain that?

    Many thanks in advance and sorry for the misspelling: I'm just French

    Place an object where you want and PIN in this position by selecting its relative position in the band of higher order:

  • Not all the items on the Page appear in the window Session

    Version 4.2.5.00.08

    Hello

    I have a page with elements of Page 48, and when I click on the Session icon in the bar than 37 see the same developer when lines is set to 5000 and the view is defined on Page elements and I click on the Set button.

    I tried another page with Page 37 items and only 17 show in the window Session.

    I checked in Firefox version 39.0 and IE 11.0.9600.17914

    Anyone know how to do to have ALL elements of the Page view?

    Can what information I provide?

    Thank you

    Joe

    Hey Joe,

    This previous discussion may help you: Re: popup for Session State

    Thank you

    Erick

  • How to select multiple items in the Panel of DOM? I tried to use the SHIFT key, but it doesn't seem to work.

    I need help, select several items in my Panel of DOM, for some reason, using the SHIFT key does not work.

    I found the answer, apparently everything I had to do has been updated to the latest version of dreamweaver cc 2015.2. The Shift function is something new added in the update.

  • Why my navigation move a few pixels by shifting the pages?

    Hi all!

    It is a question that I had intended to ask for years know but have not obtained because the problem is so small.

    But: it's now getting on my nerves for the fifth site in a row so I thought I would ask here:

    When I move between pages on my site at the www.bengtssonstromberg.com... Strategic design for the high demands of the brands

    The navigation between the pages of the jumps a few pixels (May 7-8).

    Jump between (the main navigation pages) news and work on a larger screen, the browser some padding, and you'll see what I mean...

    Eternally grateful if someone knows how to solve this problem!

    / Mathias

    Hi Mathias,.

    You'll get started here. Almost all of the pages of the site set up the browser, unless it is condensed down significantly, with the exception of 'Work', where content goes below the fold a little, so it displays the scroll bar on the right, which moves the page to the left slightly.

    David

  • How to set the time to refresh the page items when the Page is loaded

    Hi all

    When my pages load, some hidden page items are displayed, and when the page load they are hidden again. Is it possible to keep hidden without this time to refresh?

    Thank you

    Bsalvador

    bsalvador wrote:

    You know the syntax of css to hide the label too?

    #P1_ITEM_X, label[for="P1_ITEM_X"],
    #P1_ITEM_Y, label[for="P1_ITEM_Y"],
    #P1_ITEM_Z, label[for="P1_ITEM_Z"] {
      display: none;
    } 
    

    However this will not affect the underlying layout grid, which still affects the appearance of the page. If possible you can put the items in question in separate regions [sub] and show/hide those, rather than the individual elements.

    Post edited by: fac586

Maybe you are looking for

  • number alinement

    Hi when I use the column with the total is on the left of the box and the other numbers numbers are right out of the box, how can I get them in aline

  • Satellite Pro A10: Question about upgrade HARD drive

    I want a bigger hard drive, but xp home edition preinstalled. If I change the hard drive I don't think that the recovery disc would work to re install xp. How can I do this without having to buy a new version of windows? Oh, it's a portable satellite

  • Duplicate songs...

    Hi all... Recently, I noticed in my music app on my iPhone and iPad there are a few 'Albums' who have a song duplicate, some who have duplicate songs and some that the 'Album' and every song on it, are duplicated. For clarity, double means "two." In

  • Satellite A200 - 13R PSAE0E - impossible to find good BIOS

    I can't find the drivers and bios just for this model of Satellite with model n ° * PSAE0E-011010CZ *.Can someone help me and write me this link or equivalent 100% Satellite. Thank you very much...

  • Package update adapter LAN downloads but report says that there can be no

    ThinkPad T61 (7659-22) "Update my system" recommended software adapter INTEL PRO/1000 LAN for Windows Vista 32 - bit version 9.12.41.1001 I told him to go ahead and I see the download progress counter reach 0 remaining bytes, but it then reports that