[AS][CS3] duplicate page items in a specific position on another doc

Hello,
I need to copy or duplicate page items of the active page of doc 1 in a specific position of the active page of doc 2.
I can duplicate the page items of doc 1 into the doc 2 (with the code below) but can't find a way to duplicate them in a specific position: they are always duplicated in the same position on the active page of doc 2.
The current working code (simplified) is:
tell application "Adobe InDesign CS3"
tell document 1
tell layout window 1
set pageitemlist to every page item of active page
end tell
end tell
duplicate pageitemlist to the active page of layout window 1 of document 2
end tell
Thanks for your help!

-- This works in CS4:
tell application "Adobe InDesign CS4"
tell document 1
tell page 2
set d to duplicate page item "textframe1" -- the text frame labeled "textframe1"
-- FYI, d has a class of list:
-- "text frame id 328 of page id 237 of spread id 232 of document "Untitled-2" of application "Adobe InDesign CS4""
end tell
move d to page 4 -- moves to 0,0 on pg4
end tell
end tell

Similar Messages

  • [CS3 Server] Page items copy problem

    I'm trying to copy page items from one document to other. I use kCopyCmdBoss command.
    Command processes successfully but extra pages are generated in destination document and InDesign fails after opening it.
    What could be a problem?
    Thanks in advance.

    -- This works in CS4:
    tell application "Adobe InDesign CS4"
    tell document 1
    tell page 2
    set d to duplicate page item "textframe1" -- the text frame labeled "textframe1"
    -- FYI, d has a class of list:
    -- "text frame id 328 of page id 237 of spread id 232 of document "Untitled-2" of application "Adobe InDesign CS4""
    end tell
    move d to page 4 -- moves to 0,0 on pg4
    end tell
    end tell

  • [JS CS3] disappearing page items

    Now this is strange: I've written a script that does some imposition of a an image on a single sheet (page) and puts some special printers marks along the side. Now there's (as far as i am aware of) one instance where all the page items get placed on the page, but when you save, close and reopen the document, half of them are gone!
    When you drag the page items before saving they disappear right from under your cursor! I've tried putting a lot of save commands during the script, hoping that that would nail those items down, but with no luck.
    Has anybody had a similar experience and found a solution?
    Thanks,
    james

    Hi,
    You should send your script then we could have a try on our side.
    Loic

  • CS3: Rotated page item: How can I get the top-right point

    Hi
    I have a rotated page item. Now I should have the top-right and the bottom left point. If I get the rectangle of this page item I only have the top-left and the bottom-right point. And I can read the rotation angle.
    - How can I get the missing points?
    Thanks
    Hans

    Algorithmically speaking (ie, this is NOT real code), isn't it just something like:
    if page.rotationAngle == 90 then
    origTopLeft = (newBottomRight.Y, newTopLeft.X);
    else if page.rotationAngle == -90 then
    origTopLeft = (newTopLeft.Y, newBottomRight.X);
    else if page.rotationAngle == 180 then
    origTopLeft = newBottomRight;
    else
    origTopLeft = newTopLeft;

  • Session state of page item different from one region to another region

    hi,
    on one particular page I have two regions. A page item (LOV pop-up) is set in the first region. I leave this region with a button and jump back with a branch to the same page. The page item has now the selected value (as is shown by session state window). So far so good.
    The second region (SQL query type) uses this page item. However, for some reason the page item is NULL in that second region.
    Can anyone explain this behavior ?
    ron

    thanks Joel,
    I did already what you suggested. The title in region 2 is evaluated to the same value as in region 1.
    The SQL query (that actually runned with identical syntax before) is:
    select bla from blatable where bla = :P920_RU
    this generates:
    report error:
    ORA-12801: error signaled in parallel query server P000
    ORA-01741: illegal zero-length identifier
    So apperently the bind variable is evaluted to (or cached as) NULL.
    I noticed something strange in the session window. There are several page items in the application. All of them are listed in the 'Session State' region. The page item that makes problems is the only one that is also listed in the 'Page Items' region. It is even listed when I start the session window from another page. Weird.
    any other ideas ?
    Actually, how could you possibly clear session state between rendering two regions ?
    Ron

  • Display page items based on Authorization Scheme...

    I have a report form that shows all my columns, but I have two columns that I only want "Admin" and "Edit" from my authorization scheme to be able to edit; but I would like for "User" to view.
    Currently I have "authorization" enabled for the two items, and set for "Edit". This works, except the "User" logins cannot view the items.
    I thought of two possibilities, both I think I'd need help on though!:
    1. Create a duplicate page item for these two items. One would show as "Text" only (cannot edit). The other would be "Text Field". The "Text Field" column would only be
    accessible by "Edit" or "Admin".
    The problem, though, is now "Edit" or "Admin" users will see both columns
    2. Set up something in "Conditions" that would show as "text" for "User", and as "Text Field" for "Admin" or "Edit"?
    I would have no clue how to do this...
    Any thoughts?
    Kevin L.

    Kevin
    You can create two items and in the Authorization Scheme you can set one as Users and second as Edit. Also You can do something using small JS. Create a variable P_USR_TYPE to hold the value of User group lets say 1 for Users and 2 for Edit. Then on the HTML header or footer of the region you can add a javascript call
    function UsrCustomization()
         if ( P_USR_TYPE == 1 )
              // mark the item as readonly
              // document.getElementById('P1_FIELD_QUESTION').disabled = true;
              document.getElementById('P1_FIELD_QUESTION').readOnly="readonly"
    UsrCustomization();Thanks,
    Manish

  • "OracleBI Spreadsheet Add-In" – bug on the page items

    I detected that "OracleBI Spreadsheet Add-In" has a bug on the page items. It occurs when I have more than one page item. What happens is that all the page items (except the first), don’t permit to select other values. This is, I can click in the ComboBox, I can see the values that the ComboBox contains and I can select a value of the ComboBox. When I select other value, the add-in executes the query (it refreshes the sheet), but the value of the combo is not modified, and the values of the facts aren’t also modified. (The query that is done is the same)
    But if I change the layout, and put the page item in the first position, the value of the ComboBox is modified and a new query is executed.
    I am using only ROLAP cubes.
    The version of the database is 10.1.0.4.0.
    I did an upgrade from 10.1.0.2.0 to 10.1.0.4.0.
    The version of "OracleBI Spreadsheet Add-In” is:
    Release 1 version 10.1.2.0.0 - (build 10.1.2.0.36)
    When is done a new version of "OracleBI Spreadsheet Add-In”, without this bug?
    Regards,
    Rui Torres

    The metadata is ok according to “Oracle Enterprise Manager Website”.
    The version of Excel that I use is:
    Microsoft Office Excel 2003 (11.5612.5606).
    But is very stranger that the first page item works perfectly and the others have a bad behaviour, isn’t it?
    Regards,
    Rui Torres

  • Clear page cache - All except specific items

    APEX 4.2.1
    On a page with dozens of editable page items, when branching back to the same page on-submit, is there a way to clear cache for all items except a few (key) items? The branch attributes (via the f?p= syntax) support clearing cache for the entire page and setting specific item/value pairs but no support for exclusions.
    Any ideas? Thanks

    I wrote a utility procedure to do this a couple of years ago. Something like this (reusing a slightly modified version of the Shuttle item - Saving changes):
    create or replace procedure clear_page_cache_except (
        p_page          in number
      , p_exclude_items in varchar2
      , p_separator     in varchar2 := ',')
    is
    begin
      for item in (
        select
            i.item_name
        from
            apex_application_page_items i
        where
            i.application_id = nv('app_id')
        and i.page_id = clear_page_cache_except.p_page
        minus
        select
            x.column_value
        from
            table(
              string_to_coll(
                  upper(clear_page_cache_except.p_exclude_items)
                , clear_page_cache_except.p_separator)) x)
      loop
        apex_util.set_session_state(item.item_name, null);
      end loop;
    end clear_page_cache_except;However IIRC we mainly used this from packages: it's not very branch-to-page friendly. Possibly use a Branch to PL/SQL Procedure with a procedure that calls <tt>clear_page_cache_except</tt> then redirects to the page?

  • [AS CS3] Bug? All Page Items - grouped items w labels

    Can anyone confirm this behaviour for me. I would classify it as a bug, but maybe the logic for it not being a bug escapes me.
    The command "all page items" is supposed to return a (flat) list of every page object, right? I would suspect that I should be able to address any object in the list. But I can only seem to address an object when it's inside of a group.
    I am trying to get the text of a text frame that has a label. It may or may not be inside a group. I can certainly do a try/error block to try a script statement for objects in a group or not in a group. But I think that "all page items" should be able to handle it directly.
    Here's a test script: ------
    tell application "Adobe InDesign CS3"
    tell document 1
    get label of all page items
    set myUngrouped to contents of text frame "some label" --only works when objects ungrouped, this is expected
    set myText to (get contents of text frame "some label" of all page items)
    --both statements work ONLY when objects grouped
    set myText to (get contents of every page item of all page items whose label is "some label")
    end tell
    end tell
    Steps:
    Make a new document.
    Draw a text frame. Type some text into it.
    Label the frame "some label".
    Draw another empty graphic or text frame.
    Run script
    -->result is, myText statements error out. Why is this?
    Now group all items on page.
    Run script.
    -->result is, myUngrouped can't continue. This is expected.
    Comment out myUngrouped statement
    Run script.
    -->result is, myText statements work OK.

    On 19/8/08 1:14 AM, "SuperMacGuy" <[email protected]> wrote:<br /><br />> set myText to (get contents of every page item of all page items whose label<br />> is "some label") <br /><br />The syntax is a bit tricky. The key is that all page items returns a list,<br />so what you want is certain items -- not page items -- from that list. So:<br /><br />set myText to (every item of all page items whose label is "some label")<br /><br /><br />-- <br />Shane Stanley <[email protected]>

  • Align page items (AS) (CS3)

    Scripting Gurus,
    Is there some simple AS syntax to align selected page items on a page?
    Dictionary seems to imply that, saying:
    align distribute items page item : The page items to align or distribute.
    align option left edges/top edges/right edges/bottom edges/horizontal centers/vertical centers : The type of alignment to apply.
    I attempted this:
    tell page items in selection
    set vertical alignment to top edges
    end tell
    Thanks!
    Joe

    Its kinda of crazy but here ya go, I wish the AppleScript Dictionary listed  examples ...esp. when the syntax is wacky.
    select a bunch of images, or have the object references in a list(I just use selection to make it easier):
    tell application "Adobe InDesign CS3"
        tell active document
            set myimages to selection
            align align distribute items myimages align option left edges
        end tell
    The text in the red is where you put those paramaters listed in the dictionary.
    ~Mike

  • [CS3 JS] Getting a page item by its script label

    I have a text frame on a master page with its script label set. In my script, I am trying to get a reference to the text frame with this:
    var doc = app.activeDocument;
    var spread = doc.masterSpreads[0];
    var tabFrame = spread.allPageItems.item("TabLeft");
    I get the error "spread.allPageItems.item is not a function"
    Any help will be appreciated. Thanks.
    Rick

    Hi Rick,
    spread.allPageItems returns a flattened array of all of the page items in the spread, at any level of the hierarchy (i.e., inside groups and other page items). Is that what you want? Sadly, allPageItems does not benefit from the special case where we use the label as a name, so you'll have to iterate if that's what you want.
    As Peter says (thanks, Peter!), spread.pageItems.item("label") gives you all of the page items whose label matches the string, but it does so in sort of a weird way--you'll always get a page item object. If no page items match, you get an invalid page item; if one matched, you get a single page item, and if multiple page items matched, you get a page item object that actually contains multiple page items. It can take a little testing to figure out exactly what it is that was returned.
    Thanks,
    Ole

  • [CS3] Stroke Type of an page item?

    Hello!
    Does anybody know how to get the stroke type of an page item?
    There are so many possibilities.
    Thanks,
    Alois Blaimer

    Hello!<br /><br />I have found somenthing:<br /><br />          // Inspect dash.<br />          InterfacePtr<IDashedAttributeValues> dashedAttributeValues(static_cast<IDashedAttributeValues*>(descriptor->QueryAttribute(kDa shedAttributeValuesBoss, IDashedAttributeValues::kDefaultIID)));<br />          if (dashedAttributeValues != nil) {<br />               SNIPLOG(" dashedAttributeValues");<br />               for (int32 i = 0; i < dashedAttributeValues->NumValues(); i++) {<br />                    SNIPLOG("  [%d] %f", i, ::ToDouble(dashedAttributeValues->GetValue(i)));<br />               }<br />          }<br /><br />But the problem is, it always returns "12". I change the stroke style and it always returns "12".<br /><br />What's wrong with the code?<br /><br />Thanks,<br />Alois Blaimer

  • CS3/CS4 - Preview of page item = Crash in rare cases

    Hi,
    I'm wondering about how the to draw a preview of a page item, in the most correct way. Currently im using the SnapshotUtils like:
    SnapshotUtils ex(somePageItemRef,scaling,scaling);
    And then:
    AGMImageRecord* fpCurAGMImage = (AGMImageRecord*)ex.CreateAGMImageAccessor()->GetAGMImageRecord();
    to obtain an AGMImageRecord that I can draw onto an IGraphicsPort:
    PMMatrix theMatrix;    // No transform
    gPort->image(fpCurAGMImage, theMatrix, 0);
    However, one customer(PPC Mac 10.4 CS4) had a crash in this code, as seen from the partial stack trace below:
    Thread 0 Crashed:
    0   AdobeAGM                            0x01417418 AGMTerminate + 4143764
    1   AdobeAGM                            0x012b645c AGMTerminate + 2697944
    2   AdobeAGM                            0x012bc3e8 AGMTerminate + 2722404
    3   AdobeAGM                            0x012be210 AGMTerminate + 2730124
    4   AdobeAGM                            0x0120b8d4 AGMTerminate + 1998672
    5   AdobeAGM                            0x01030150 AGMTerminate + 51148
    6   ...adobe.InDesign.AppFramework      0x114f48c8 GetPlugIn + 118040
    7   ...adobe.InDesign.AppFramework      0x114f4b30 GetPlugIn + 118656
    8   com.adobe.InDesign.MyPlugin              0x0e405778
    MyCustomView::Draw (IViewPort*, __HIShape*) + 1560
    I can see in the documentation that the GetAGMImageRecord function should not be called any more as of InDesign 3.0, however I cannot figure out another way of obtaining an object that i can draw onto the IGraphicsPort? Is there a more preferred solution?
    I Hope somebody can help on this one
    Thanks!
    Kind regards Toke

    Hi Toke,
    I do not have any experience with this sort of stuff ;-(
    However have you noticed the sdk sample transparencyeffect which still uses GetAGMImageRecord even with CS4. Maybe the sample code sheds some light on your problem.
    Best,
    Peter Schülke

  • CS3 / Win: Observe copy/paste action of a page item

    Hi
    I like to observe the manual copy and paste of a page item.
    How can I do that?
    What do I have to attach to the observer?
    I get the action kAddToHierarchyCmdBoss and kNewPageItemCmdBoss when I copy and paste a page item. this works.
    Now the problem:
    In the text story of my page item there is a table. I can get the number of tables and the ITableModel of the text story in my application, thats not a problem. But I can't get the ITableModel in my observer (kAddToHierarchyCmdBoss ) if I paste the page item. The interface is always nil. I don't know why and I am looking for a solution.
    Maybe the text story is not finished when I get the kAddToHierarchyCmdBoss.
    Is it possible to observe if a text story is finished? I mean the copy of a text story is finished.
    Thanks a lot.
    Kind regard
    Hans

    I am checking in myDocObserver cmd->GetCommandState() == ICommand::kDone?

  • [CS3] How to get whether a UID is a spread, page, page item?

    Hello!
    I have an UID.
    How can I get whether behind the UID is a spread or a page or a page item?
    Alois Blaimer

    You can't.
    If you have a database for that UID though, you can use database->GetClass(myUID) ...
    Rather than dispatching on the class ID, you better identify your required interfaces on the boss. Instantiate them (again using db+id) and if those do not exist navigate around in IHierarchy or give up gracefully. Note there are some more boss classes and stranger arrangements than you initially know - master spreads, groups, standoff, inline items, multicolumn text and so forth.
    Dirk

Maybe you are looking for

  • Modify field in ALV

    Hello to all. Anyone know how to print only a few char of a field in ALV? The outputlen defines the number of characters, but there's a way to tell it to print from the second or third position?

  • How do I fast forward a track to a specific time with my iPod Touch in iTunes?

    Hello, I have an iPod Touch and would like to find out how can I fast forward a track to a specific time in iTunes? There is only play/pause, ff & rewind, and volume buttons but no time clock to see where I am in the track. This is the case for podca

  • Printout is too dark. PSE 7, Windows Vista

    Hi, My name is JPSingh. After editing when I print the photo is darker than the display. This does not happen when printing the same image with the same printer driver when I use Microsoft Office Picture Manager and Canon Easy Photo PrintX.  The sett

  • Resizing Extension Panel does not layout Flex controls at all, simply scales stage

    Hello, I'm having this issue with Extension Panels in Fireworks compiled with the Flex 4 SDK. When the panel is first opened, it has the correct dimensions and controls are laid out correctly. If I resize it at all, it scales itself instead of laying

  • Installing Solaris 8 on Dell GX 240 (Intel P4)

    While trying to installing Solaris 8 that I purchased from Sun, the installation process never gets to writing/formating the hard drive. Each time it gets to the menu to choose installation method, the system reboots after running a few more processe