Move page item into a rectangle

Hello guys,
the indesign client allows it to move a page item into a rectangle by copy it and pase with the option "paste into selection". How this behavior can be achieved by scripting on the indesign server?
Thanks for the answers!

That turned out to be a bit harder than I thought as first ...
It seems you cannot simply do
  rectangles[0].add (someOtherObject);
or
  someOtherObject.move (rectangles[0]);
With the regular version of CS4, you can easily copy the manual approach:
app.cut();
app.documents[0].rectangles[0].select();
app.pasteInto();
-- but does that even work on ID Server? (I would guess not.)
The hard way is to add an instance of your original object to the correct type of the rectangle's properties array, copy all properties of the original object into the new one, then delete the original object.
For instance, if you want to 'move' a text frame into a rectangle, do something like
origTf = textFrames[0];
myTf = rectangles[0].textFrames.add();
myTf.geometricBounds = orgTf.geometricBounds;
myTf.strokeWidth = orgTf.strokeWidth;
myTf.fillColor = orgTf.fillColor;
... for all possible properties of a text frame. For an image, do the same but with Image properties. For a graphic line, do the same but with GraphicLine properties ... (It sounds like a totally insane way of working, but remember that internally InDesign itself can access all lists of properties 'immediately'.)
You cannot use a PageItem this way ... because you can't "add" a page item!
Dave Saunders shows how it works with a very basic text frame: Easily Add Captions to Graphic Frames

Similar Messages

  • Can't move "completed" items into folders using Outlook 2013 on a Microsoft Office 365 Home Premium Account using a work Exchange 2010 address

    I've been in touch with several Microsoft support teams about this issue, and the latest move was to shove me off onto Pro support, but since I'm using a personal Office account, I'm hoping that through the community I can find a way to resolve this issue without
    escalating through our IT department. I do not think this is an Exchange issues because I have previously used this product and method without resulting in this error on a Windows 7 32-bit AMD computer and a Windows 8 and 8.1 Professional 64-bit Intel computer.
    Here's my current specs:
    Windows 7 Professional 64-bit, service pack 1
    AMD A6-5400 3.6 GHz
    8GB RAM
    Microsoft Office 365 Home Premium
    Office updates automatically, version 15.0.4551.1512
    About Outlook shows "Microsoft Outlook 2013 (15.0.4551.1511) MSA (15.0.4551.1508) 32-bit/Part of Microsoft Office 365 Home Premium"
    Here's how to reproduce the issue:
    1) Open View Settings
    2) Select "Other Settings..."
    3) Disable "Use compact layout in widths smaller than XX characters" and enable "Always use single-line layout"
    4) Select "Columns..."
    5) Under "All Mail fields" add "In folder"
    6) Select any email
    7) Context-menu -> Find Related -> Emails in this Conversation
    8) Select "more"
    9) Sort by folder
    10) Select all messages from Inbox.
    11) Use Outlook's preset "Done" function and select a destination folder
    12) Watch Outlook fail to run "Done" and reset your UI without producing an error.
    The first attempt to resolve this issue was to set up a new Outlook profile. This seemed to exacerbate the problem and resulted in Outlook providing an "Unknown error" before resetting the UI.
    The second attempt to resolve this issue was to run "outlook.exe /resetnavpane". However, the nav pane does not appear immediately relevant to this issue.  
    The following similar steps also result in a crash, this time with an error:
    11) Flag all select message as Complete.
    12) Move all messages from Inbox to a destination folder.
    This change in procedure results in the error "Cannot move the items. Some items cannot be moved. They were either already moved or deleted, or access was denied."
    Help me, Microsoft Community. You're my only hope.

    Import the calendar and contacts in Outlook.com. For contacts, export from Outlook as csv and import into Outlook by choosing the Other option (https://people.live.com/import/other?biciid=ImportCatalog) 
    You'll need to save the calendar as an ics file to import it. Select the calendar folder, the File, Save as an save as an ics. 
    Diane Poremsky [MVP - Outlook]
    Outlook & Exchange Solutions Center
    Outlook Tips
    Subscribe to Exchange Messaging Outlook weekly newsletter

  • How to move excluded items into Measures in OBIEE 11g Pivot Table

    Hi All,
    Need your help. Previously I have about 25 facts in my pivot table as rows. Now I need to add about 10 more. Adding new criteria only put the items into Excluded section. How can I move all these new items at once to the end of the existing facts? What I can do now is moving them one by one, and in the middle of existing facts, then move it again, because I can point my cursor to the end of them directly.
    Thanks a lot,
    Gajah.

    I've tried to drag the fact heading, but I can't point my cursor to the end of existing list of facts (unfortunately they are all in the same fact group name). Do you have any suggestion on how to put the new facts at the end of the list?
    Thanks.

  • Stickies don't save on quit, Preview crashes on open, the desktop asked for password when I try to move an item into a folder or delete something.

    Hi,
    As the title said, and I also had dropbox syncing issues, but I seemed to have fix that by [applying permissions settings to all enclosing items].
    The other issues...
    I already tried repairing permissons thru disk utility and the restart cmd+r thing, I also reinstalled lion, hoping to fix this, so now I'm on lion 10.7 (but I will update soon).
    I'm not sure what I did wrong, but I was installing extensis, uninstalling it, then reinstalling it.... and then I probably screwed up the permissions to a whole bunch of folders all at once, because now I have a huge batch of issues, some big, some small. I probably won't even know the full extent of my wrongs.
    Thank you in advance.

    Repairing the permissions of a home folder in Lion is a complicated procedure. I don’t know of a simpler one that always works.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy – do not type – the following line into the Terminal window, then press return:
    chmod -R -N ~
    The command will take a noticeable amount of time to run. When a new line ending in a dollar sign ($) appears below what you entered, it’s done. You may see a few error messages about an “invalid argument” while the command is running. You can ignore those. If you get an error message with the words “Permission denied,” enter this:
    sudo !!
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up.
    Next, boot from your recovery partition by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.
    When the recovery desktop appears, select Utilities ▹ Terminal from the menu bar.
    In the Terminal window, enter “resetpassword” (without the quotes) and press return. A Reset Password window opens.
    Select your boot volume if not already selected.
    Select your username from the menu labeled Select the user account if not already selected.
    Under Reset Home Directory Permissions and ACLs, click the Reset button.
    Select  ▹ Restart from the menu bar.

  • Is it possible to manually move catalog items into the /root folder?

    Hey all,
    I am trying to move a bunch of old analyses/dashboards into a new 11G installation from my 10G one.  The 11G installation pulls from the same database and has a (almost) identical repository.  I've tried copying and pasting the files (.atr etc) into folders in catalog/paint/root but they won't appear in the BI catalog...does anyone know how to get the tool to recognize them?
    Thanks!
    UPDATE:  I ran the "Scan and Update catalog objects that require updates" in the administrator section and it recognized the file and updated it.  I then hit "Reload Files and Metadata" and it still isn't appearing.

    Hi You have the original 10g rpd and catalog. Try try the following:
    Goto the middleware directory then the BI Instance, then the bin, or do a search you should find the following file:
    ua.bat
    Run this and follow the prompts then use that rpd, and catalog it produces, give it a shot, may be a better way for you.
    Thanks
    K

  • How to move page item from one page to another page in a document?

    I used kMoveToSpreadCmdBoss for spreads but It's not working for pages.

    I used kCopyCmdBoss and kPasteCmdBoss command but it's not working because it needs only spread layer UIDRef not for page. 

  • I'm running a 13" MAC pro with version 10.8.2  But none of that will matter once you hear my news.  Some days ago, I copied then pasted a long page item into my calendar.  Now, all the claendar does is beep at me.  I can't delete or cut the entry.  In sho

    I'm running a 13" MAC pro with version Lion v.10.8.2  But none of that will matter once you hear my news.  Some days ago, I copied then pasted a long piece of type into into my calendar.  Now, the things jammed up and all it  does is beep at me.  I can't delete or cut the entry.  There much be someone out their smarter than I.  Help!

    Try restoring from your backup of a day or so prior to when you made the error.

  • If I move an item into "Junk" can I then view it in the preview screen without risk of any clever malware being liberated?

    I understand that malware may gain access to my computer simply by viewing a malicious email in the "preview" window of my Thunderbird Inbox. If this is correct can I effectively quarantine the message by moving it to "Junk"? I read somewhere that once a message has been identified as "Junk" it is prevented from releasing any malware that might be embedded. I ask this because sometimes I am not entirely sure if the email really is Junk or if I am being overly cautious and would like to read the message to be sure. I emphasize that I am not talking about clicking on an attachment or following a Link, but simply viewing an email message.

    ''re: I understand that malware may gain access to my computer simply by viewing a malicious email in the 'preview' window of my Thunderbird Inbox. '' - not sure where you read that but it is not correct.
    First, I will clarify that there is no 'preview' window.
    'Preview' implies that the email has not been opened.
    A single click on email in list will open the email in the 'Message Pane' displayed below email list.
    A double click will open the email in either a new tab or window.
    All methods open the email.
    What folder the emails is irrelevant - a selected email will open no matter what folder.
    Thunderbird automatically defaults to not showing 'remote content'.
    ''By default, Thunderbird blocks remote images and other content in messages from people you don't know. This protects your privacy because spammers can verify your email address by detecting if you viewed a remote image in a message from them. Its also possible to embed an executable (malware) in images.''
    ''When you receive a message with remote images, Thunderbird will display an alert stating that remote images have been blocked, and the images in the message body will be replaced with simple place-holders''
    * http://kb.mozillazine.org/Privacy_basics_%28Thunderbird%29
    So if you do not allow remote content and do not click on links nor open attachments, then you will be ok.

  • Arangement of Page Items and Regions

    I created an APEX page (version 4.0.1.00.03) named Request Edit with many page items for data entry of user requests. The form has a region named Request Edit that holds the data entry page items. Within the region is a region for buttons. There were two addition regions on the page below the buttons named Jobs a report region and Audit a Show/Hide region. The users do not like to scroll the page during data entry so I decided to place many page items into three new Hide/Show regions name Requestor, Recipient, and Service. I defined the regions and then moved the page items to one of the three regions Requestor, Recipient, and Service. When the page is displayed the three new regions displayed after the audit region. I wanted the new regions to display after the Request Number and before the Comments page items. I decide to change the Parent Region in the User Interface properties of the page to Request Edit for the new regions. That moved the three regions above the Audit region but after the Comments page item.
    What properties of the three new regions Requestor, Recipient, and Service will position the new regions after the Request Number and before the Comments Page items? Is it necessary to define the Parent Region in the User Interface properties of the page to Request Edit for all of the regions?
    To describe visually what I am trying to do imagine the following simplified page:
    <Create> <Save>
    Request ID: [________]
    Requestor Name: [_________]
    Recipient Name:[ __________]
    Service Type: [____________]
    Comments: [____________________]
    <Create> <Save>
    Jobs Report Region
    +Audit Region
    I defined three regions and moved the page items to them
    <Create> <Save>
    Request ID: [________]
    Comments: [____________________]
    <Create> <Save>
    +Requestor
    +Recipient
    +Service
    Jobs Report Region
    +Audit Region
    After I defined the Parent Region in the User Interface properties of the page to Request Edit it looks something like this:
    <Create> <Save>
    Request ID: [________]
    Comments: [____________________]
    +Requestor
    +Recipient
    +Service
    <Create> <Save>
    Jobs Report Region
    +Audit Region
    But I want the new regions to display between the Request ID and Comments page items.
    Thank you.

    here is how i got someting like that to work with a raoid group.
    page HTML header:
    &lt;script&gt;
    function Show_On_Radio_Value_2(pThis, pThat, pValue, pLabel){
    var rv = html_RadioValue(pThis);
    var elm = document.getElementById(pThat);
    var lbl = document.getElementById(pLabel);
    if (rv == pValue) {
    html_ShowElement(pThat);
    html_ShowElement(pLabel);
    } else {
    html_HideElement(pThat);
    html_HideElement(pLabel); }
    }&lt;/script&gt;
    REGION Footer:
    &lt;script&gt;
    Show_On_Radio_Value_2('<code>P3_ENT_APPROVAL</code>
    ','<code>P3_REJECTION_DESC</code>
    ',"Y",'L_<code>P3_REJECTION_DESC</code>
    &lt;/script&gt;
    I think thats it but it should get you in ther right direction.
    jp
    Edited by: SHONET on Nov 12, 2008 9:26 AM

  • Page Items displayed in table borders

    Hello,
    This might be a 'newbie' question, but I need to design a form layout in a 'Grid', so I need to know how to enable borders around each page item (cell). I wish there was a way to create a layout in Dreamweaver and then have Html DB insert each page item into the cell I choose.
    Any help?
    Regards,
    Jeff

    Any ideas on this? I have tried the custom template and changed the border="1", but that does not look very good. I want it to look more like excel, where there are titles (column headings) and within each column, each cell has a border completely around it with page items in them. Is this possible?
    Thanks!
    Jeff

  • Getting page item to resolve in URL

    I have a page item which gets the IP of the sending computer. I then need to put this page item into a URL, but for some reason cannot get it to resolve. So I have a button that is set to redirect to:
    http://&p2_id/cgi-bin/labelprinter.py?barcode=&P2_BARCODE.
    Everything resolves fine except for P2_ID. Do I need to escape something? TIA

    Here's one option: create a JavaScript function which will "create" URL for you. In order to do that, create a hidden text item (let's call it P2_URL).
    (I hope I don't have typos in here!)
    <script language="JavaScript" type="text/javascript">
      function create_url()
         $x('P2_URL').value =
           "http://" + $x('P2_ID').value +
           "/cgi-bin/labelprinter.py?barcode=" +
            $x('P2_BARCODE').value;
         window.open($x('P2_URL').value);
    </script>Now, your button: set its action to "Redirect to URL" and URL Target tojavascript:create_url();

  • Placing library item into page

    This script for placing library item into page and applying object style to the item. In line 16, script shows that "assets" property does not support. Please resolve this.
    if (app.documents.length==0){
        alert("Please open the Document");
        exit();
    if (app.libraries.length==0){
        alert("Please open the Library");
        exit();
    app.findTextPreferences=app.changeTextPreferences=null;
    app.findTextPreferences.appliedParagraphStyle="MN";
    var myfound=app.activeDocument.findText();
    alert(myfound.length);
    for(i=0; i<myfound.length; i++){
    var mylib=app.libraries.assets.itemByName("Box").placeAsset(myfound[i].insertionPoints[0]);
    var mymove=myfound[i].move(LocationOptions.atBeginning, mylib.insertionPoints[0])
    mylib.appliedObjectStyle="MN_Obj";

    To make that work, you have to address an open library (line 16).
    app.libraries describes the collection of all open libraries, not a distinct one.
    If only one library is open you could address the one with its index:
    app.libraries[0]
    If you already know the name of the library or better, the exact path of the library, you can:
    1. Make sure to open it
    2. Call it by its name
    Let's assume you know the name and you know that the asset you want to place is stored inside, you could do it this way:
    app.libraries.itemByName("TheNameOfTheLibrary").assets.itemByName("Box").placeAsset(
    /*Wherever you want*/
    Now, what will this line return?
    A library object? Hardly. So be cautious with using a variable name like "mylib".
    According to documentation it is returning an Array, and we can assume, that in this array is the object that is placed out of the library. Your asset stored in the library which goes by the name of "Box". Whatever that is.
    If you want to find out, you can use the following, more descriptive variable: "myPlacedAsset". That sounds more neutral.
    var myPlacedAsset = app.libraries.itemByName("TheNameOfTheLibrary").assets.itemByName("Box").placeAsset(
    /*Wherever you want*/
    Using the ESTK (ExtendScript Toolkit) together with $.writeln() can write the true nature of the placed asset to your JavaScript Console:
    $.writeln(myPlacedAsset.constructor.name);
    is informing you what kind of object "myPlacedAsset" really is. If indeed it is an Array, you could look for its length. If its length is "1", you get to the "heart" of your placed object by:
    $.writeln(myPlacedAsset[0].constructor.name);
    Or by that more inquisitory question:
    $.writeln(myPlacedAsset[0].getElements()[0].constructor.name);
    If your array is of a greater length, you have to loop through this array and question every single object!
    Before testing, exchange my comment "/*Wherever you want*/" with the code you like to use: Obviously the first insertion point of your found text. Hold on! This will backfire to you, because every time you place one instance of the asset you will add a character to your found text and shift the original insertionPoint. Better loop from back to forth or do the search from back to forth.
    Adobe InDesign CS6 (8.0) Object Model JS: Text
    Please, try that and report back…
    (Isn't noone reading the documentation these days?)
    Indesign JavaScript Help
    Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents, Libraries Suite
    Adobe InDesign CS6 (8.0) Object Model JS: Library
    Adobe InDesign CS6 (8.0) Object Model JS: Asset
    Adobe InDesign CS6 (8.0) Object Model JS: Asset
    Uwe

  • Recently purchased a scanner which I connect my iPad to.  everything scanned goes into iPhoto. I purchased FileApp Pro to place scanned items into files. I still can't move the scanned items to a file.  Help!

    Scanning items into iPad. Scanned items go directly to iPhoto. Purchased FileApp Pro to create file folders on iPad. Still cannot move items from iPhoto to file folder.  Help?

    Is this a NAS type of setup (of which I know very little)?  Mine is not a response based upon strong technical knowledge but iTunes seems to have problems with those.  Just about everybody has issues with iTunes but you say it is not fit  for the purpose.  What is that?  I bet for 99% of people it does.  Not  everybody has 8TB collections they are trying to use with a RAID structured  external server. iTunes is really a mass consumer piece of software.  Yes, many people have expanded beyond internal drives, but NAS arrangements seem to add levels of complexity beyond a direct external drive that is Mac formatted and at most served by an Apple brand wireless router which I suspect is probably how everything is tested. Anything more is fortuitous in terms of support.  Except that you say the library files are on the external drive too it sounds to me like the server is asleep when you say it cannot find files and then suddenly can when you go to find one.

  • Page items do not go into Excel when exporting

    We are using 10.1.2 viewer and plus (and I have the desktop version available). I have tried exporting a worksheet with page items using all 3 of the above and the page items will not go into excel. Is there any trick to get this to work? I thought that it used to work in older versions?
    thanks
    Angie

    Did you try the Export to Excel as Pivot Table option? That would create a base sheet with all the page items flattened out, a static sheet that looks like the worksheet at the time of the export, and an Excel Pivot Table where you can page through the page items.
    thanks
    Abhinav
    Oracle Business Intelligence Product Management
    BI - http://www.oracle.com/bi
    BI - http://www.oracle.com/technology/bi
    Blog - http://blogs.oracle.com/
    BI Blog - http://oraclebi.blogspot.com/

  • What is the best way to get the UID of any selected page item (frames, rectangle etc)?

    I need UID of any selected item on page and also array of UID's in case multiple selection happens. How can I achieve it?
    One way I know is to write an observer and attach it on every new page Item created, but that way the system might become slow and also
    the behavior will be unpredictable in case of multiple selections.
    Can some one suggest a better way to do it?

    The selection subsystem hides most ideas of direct adressing (e.g. UID of page item(s) or story) into the concrete selection, while from the outside you only work on the suite interfaces of the abstract selection. So you don't ask whether the selection is some kind of page item and you don't peek at the actual items. Instead you ask about their capabilities and applied values.
    Attaching observers to page items has nothing to do with the selection, because they only notify about changes on those page items - which could also be caused by scripts or anything else. Even then, the most relevant changes go thru the kDocBoss as single point to attach an observer, rather than thru all those page items.
    Regarding speed - the selection has many optimizations, for example "lazy" notifications can be deferred until they become appropriate for an UI update, they might even become aggregated / optimized away.
    One starting point into the selection when you come from nowhere would be ISelectionUtils. Your selection observer might also pass interesting parameters.
    Dirk

Maybe you are looking for

  • How to include components into mxml file?

    I have an mxml file with multiple states and it is getting quite large. I would like to divide these states into their own components. How can i include these into the mxml file? Thanks!

  • Why does the internal memory shows red?

    When I connect my iPhone to my computer and I go into the phone itself, the internal memoy bar is in red and shows that I have a little over 1 gig of memory left.  Why is it in red?  Hasn't been that way except for the last week?

  • Can anyone explain me the short  code given here...

    Hi... Below is given a code and its output is Hi from 1. Can anyone provide me an explanation for this... ie why the "String a" method is called and not "Object a". public class Test { public static Object a(Object two) System.out.println("Hi from 2"

  • Two Iphones, one Itunes, password problems.

    My wife recently upgraded herself to an Iphone, and I plugged it into my itunes. Now every time I try to update/Install a new app on MY phone, it asks me for HER pass word.  Any advice?  Thanks!

  • Connect to Data Base from Form Builder

    I have installed Oracle Developer V.6 in the same machine with data base 8i . From Form Builder I can not connect to Data base with scott/tiger with the db_name in Data base 8i. What should I do to connect it ? Thanks , Nguyen