Help with syntax: Adding pages JS CS3

I'm fairly new to scripting and I'm trying to write a script to add pages, inserting one after each existing page. We're doing postcards using a 4-up data merge. On the back of each card is the data merge/address (again, 4 to a page). Since the merge doesn't work on alternating pages, we want to do the merge first, then add the face pages afterward.
This is my code thus far:
var myPages = app.activeDocument.pages;
var myCounter = myPages.length-1;
for (i = myCounter; i >= 0; i--){
myPages.add(LocationOptions.AFTER)...;
On the line "myPages.add(LocationOptions.AFTER)..." I have tried every combination I can think of based on the CS3 Object Model that comes with Extend Script. Every one except the right one.
Many thanks for you help.
-Tim

Thanks, but I already knew that. This line from the ID Object model:
Pages.add(at:LocationOptions, reference:any, withProperties:Object):Page
would seem to imply that I can specify where to add pages. But I can't figure out how to make use of it.
To further clarify what I'm want to do, using a deck of cards as an analogy: Say I'm starting with all red cards. I want to add a black card after each red so that when I'm finished and you flip thru the deck you alternate between red and black.
-Tim

Similar Messages

  • I need help with a 1 Page Form with scrollable text field (5000 limit characters) and printing

    Hello, I have no training in using Adobe Acrobat Pro or Livecycle Designer so I need major help with a 1 page form that I am attempting to create. Basically the form will be used to nominate employees for a Job Well Done Award.
    The form contains the following:
    1.) The name(s) of the employees being nominated and the date of the accomplishment.
    2.) In the middle of the page I have a section for a write up, limited to 5000 characters, this is were I am needing the most help. A couple of things, about this section: The font is set at 11 and I don't want it to change. The text field has multiple-line, scroll long text enabled. The text field is a certain size and can only hold so much text, then it starts to scroll, which I am ok with, I like that feature. The issue I am having is during printing. I would like to keep the text field scrollable but when I print I would like to be able to print everything in that field. Executing this is the problem, I have no clue how to do it. I was hoping for some setting within Acrobat Pro or LiveCycle to be available, but the more I read and research this, it appears that it may require java, xml, basically some coding. I don't know for sure.
    3.) Below the text field I have another field for the person nominating to type their name and right next to that another field for a digital signature.
    4.) And finally below those two fields I have a Submit button that is setup to start email application so the form can be emailed to the proper inbox.
    Thank you in advance.

    With an Acrobat form the only thing you can do is export the text to
    another location (like a blank field on another page) or to another file
    format. With an LCD form you can expand the text box itself, but you'll
    need to ask about that over at the LCD Scripting forum.

  • Help with Skillbuilders Modal Page plug-in

    Hi,
    I'm an APEX 4.1 user and a novice. I'm trying to use the Skillbuilders Modal Page plug-in. I have a report with an item (Order Number) that I use to drilldown. When the user clicks on the order number link to drilldown, it goes to another page/report that displays the detailed rows for that order (read only). That all works fine. What I'm attempting to do now is display the detail report in a modal page. Similar to the "Modal Page Demo 1" [url http://apex.oracle.com/pls/apex/f?p=46685:MODAL_PAGE:0]here. I watched the [url http://skillbuilders.com/webinars/webinar.cfm/53?title=Introducing%20SkillBuilders%20Modal%20Page%20Plug-in]Skillbuilders webinar twice. The webinar was showing how to display a form in the modal page, but I figured the steps were the same for displaying a report so I followed the steps Dan did for creating a modal page from a link.
    Here's what I did:
    I inserted: onclick="return false;" class="order-number" in the Link Attributes for the Column Link (drilldown) on my Order Number column.
    I then created a Dynamic Action:
    Event = Click
    Selection Type = jQuery Selector
    jQuery Selector = .order-number (I also tried 'a.order-number'. In the webinar it looked like there was an 'a' there.)
    no condition
    Action = Skillbuilders Modal….
    Fire When Event Result Is = True
    URL Location = Attribute of Triggering Element
    Attribute Name = href
    Event Scope = live
    The modal page displays when I click on the Order Number link, but only the bottom and right side (with scroll bars) and that's it. There is no detail displayed. Also, the background isn't darkened with the modal page prominent (as demonstrated in the webinar).
    Unfortunately my app is not on apex.oracle.com, so I have no link to share. Can anyone please help? I'm at a standstill. If this isn't enough information, I am more than happy to provide whatever else is needed. I can also provide links to screen shots if that will help.
    Thanks
    David

    Hi,
    Did you try to change the Theme in the PLUGIN Settings ?
    I had the same problem when the Theme of the Plugin was set to Custom. (it is initially set to CUSTOM)
    Try to change some to 1 - 5 of them.
    Regards
    J :D

  • Help with the Photos Page?

    I posted about this problem a little time ago, but now am not sure what to do.
    When I get a photo page up and place by web banner, it is out of sync with all my other pages - and it shows.
    I compared it with setting the page up with a blank page and I can see that the problem is that whilst the text box in the blank page will move up and down and adjust individually, the text box in the header on the photo page will not move individually. When I grab the bottom to move it, the whole box moves, instead of up and down.
    How can I solve this and what can I do? I would like to use the photo page to display some diagrams that I have and this would make a better job of it than a blank page.
    Any ideas anyone? I have come to the end of everything I have tried to do. I did try altering the size, but then I had problems with the navigation bar. The banner was in sync, but then the navigation bar was out with all the rest. I am getting fed up with this.
    Help?

    Well, I had already taken the navigation bar off display because it was in the wrong place for me, so I created my own instead. I have been back and unchecked the box to include in navigation menu on all the pages and tried the photo page again and it is still slightly out with all the other pages, but just not as much this time.
    With the blank pages, you seem to be able to drag the edges of the text box and they will move independently, however, when you try the same thing on the photos page it won't do the same thing. It moves as a whole rather than individually, so that means that the text moves too and once that has happened there is no way to alter that. You can't click the box and move the text up and down. The only way is to move the box.
    I like to keep my site looking tidy and with all the pages roughly the same, so this is annoying. I don't have photos, but diagrams and they do look better displayed on a photo page. They are spaced and sized accurately and more so than I can do them myself on a blank page.
    Is there any way that you can put the photo template onto a blank page?
    No everyone wants to put photos on a website or use photo page banners.

  • Help With Printing Multiple Pages on Single Page

    I am trying to print a calendar on a single 11x17 sheet of paper. Currently the size of the calendar is forcing the application to want to print 3 pages. I have a ministry requirement that requires the calendar to be printed in Arial size 16 font and print
    on a single page. Is there any way to fit this document on to one page?
    Thank you

    I would set it up with a landscape page size of 11x17. Insert tables for the calendar, floating if necessary. Insert the text. This is not using a calendar wizard or anything of the sort.
    Tables
    Are we talking a week, a single month, two months, a quarter, four months, six months, or a year? Very much is going to be very crowded!
    As an alternative, you could try setting it up for two portrait pages and then tell word to print two pages per sheet. You would lose some paper to wider margins this way. (I have only done this with 8-1/2 x 11 pages but the principle should be the same.)
    This would require starting with an even larger font because Word would scale it. If you need exactly Arial 16 it may be tough to get.
    p.s. I envy your ability to print on 11x17.
    Charles Kenyon Madison, WI

  • More help with Skillbuilders' Modal Page Plugin

    I have an employee page with a series of smaller report regions showing things like contact addresses, job roles, etc. All are form-on-a-table+report type of setup I would like to convert to modal pages. The popup is now working (thanks to a security setting pointed out by Dan), but on all of these forms, I would like to populate the P(X)_EMP_ID item from the parent to save the users an obvious step. I've tried putting it in the URL called by the Dynamic Action and I've tried setting the item value in the modal dialog to be the parent's correlated item, but neither seems to work like it would in a standard form page call where I just list the items to pass and their values. I must be doing something wrong here, but I can't quite place it. Can someone point me at what I'm missing?
    Here's the URL I'm trying to use:
    f?p=&APP_ID.:287:&APP_SESSION.:::287::P287_EMP_ID:&P281_EMP_ID.
    where 281 is the parent page and 287 is the modal page.
    I also tried setting up an additional TRUE action associated with the Dynamic Action to assign the page item value - that didn't seem to work either. BTW - I'm strictly dealing with the CREATE button ATM. I'll get to the edit links after I get this working.

    Does your page 281 have an employee id item?
    Yes. The respective items are P281_EMP_ID and P287_EMP_ID. There is also P282_EMP_ID, P283_EMP_ID, etc.
    Even if it did it wouldn't make sense to transfer it's value to your form page if you wanted to arrive at the form page in a create mode.
    In this case it does, however. I start out on a general listing (Interactive Report) of all the employees where each has an edit link to the "master" record for the employee containing employee ID, name, etc. There are several (5+) child tables to the master, however, which contain things like addresses, contacts, etc. Each has a one-to-many relationship with the employee master record. I am attempting to display these each in their own regions and this was working fine as standard form+report on a table with the report showing along with the master employee record.
    As such, though the Employee ID acts as the foreign key to the master record, that value is predetermined by virtue of the currently displayed employee master record - thus the desire to have this value propagate down to the modal window/form page. The users also want it because they get distracted and frequently forget who they are working on. They want the name of the employee listed here, and this is difficult to display without the ID to reference.
    To arrive at page 287 in a create mode you need to clear out the value of the primary key item on that page. See the following to learn more about URL syntax:
    http://docs.oracle.com/cd/E2390301/doc/doc.41/e21674/concept_url.htm#BEIFCDGF_
    Thanks. I looked that over and tried to make sure things were in the right place, but I'm pretty sure the issue is the automatic fetch. Once I wrote my own form population process to replace the existing one, it seemed to work fine and the URL syntax passed the value as desired.

  • Newbie help with editing files in DW CS3

    I am new to using Dreamweaver, and I am having trouble with
    trying to edit existing files using DW CS3. When I open an existing
    file on my local site, DW converts some of the code using &.
    This is a problem because I need to edit the file just as it was
    originally written, so I can save it after editing and upload to my
    website.
    In my Preferences, I have Code Rewriting set to:
    -Rewrite Code: Fix invalidly nexted and unclosed tags
    [Unchecked]
    -Rewrite Code: Rename form items when posting [Checked]
    -Rewrite Code: Remove extra closing tags [Unchecked]
    -Never rewrite code: In files with extensions .as .asr .asc
    .asp .ascx .asmx .aspx .cfc .cfm .cfml .config .cs .ihtml .js .jsp
    .php .php3 .vb .xml .xsl .xslt .xul
    -Special characters: Encode <, >, &, and " in
    attribute values using & [Unchecked]
    -URL encoding: Do not encode special characters
    -Active Content: Insert using browser-safe scripts [Checked
    by default]
    -Active Content: Convert tags to scripts on file open
    [Unchecked]
    Today, I opened a file with an .xml extension, and DW rewrote
    the special characters > and '. Since I have in my preferences
    to Never rewrite code in .xml, I don't understand why DW is
    rewriting the code. Also, in my preferences I have unchecked the
    Special Characters, so why is DW still rewriting the code?
    Do I have some of the Code Rewriting preferences set wrong?
    Is there another place I need to tell DW not to rewrite
    existing code?
    Thanks for your help!
    Cyndi

    It imported both, but only shows you the raw file. Ever. What you see and what you edit will only be the raw file. The associated JPG file will follow the raw file around if you move it or rename it using Lightroom, but other than that, Lightroom will ignore it. You could safely delete the JPG, and Lightroom wouldn't complain--probably wouldn't even notice.
    There's a preference you can set that will cause JPGs to be imported as separate images. Then you'd be able to see both of them and edit them separately. That preference won't take effect on images that are already in the catalogue, but will affect all future imports.
    Hal

  • Help with "Date Added" when Syncing Playlist to iPhone5

    So I recently switched my 4s for the 5 and first had trouble with the backup files.  I was able to figure out my issues there and fix them.  The only left over issues was that the playlist on my iphone as was missing some media in my smart playlist that should update automatically.  I didnt think much of it and figure when I got home I would plug it in and download everything and I should be fine. Got home and updated my ipod first with my new music (it had been a month since updating so wanted it to have everything), then plugged in my iphone, everything updated but I then noticed that some older songs were above my newest songs (not in reverse order like an old bug I dealth with), so I right clicked ont he smart playist and selected "Copy to Play Order" and tried to re-sync. 
    No luck, so I looked at the date added column and notice that my older mucic ONLY ON MY IPHONE had today's date instead of the original download date?  I looked at me smart playlist in iTunes and it was correct.  I even tried to remove the "Date Added" column from the iphone playlist menu which put everything in correct order but when i went to re-sync it reverted back and brought the column back up. So I next tried and manually un-synced all my music and than to re-sync again, NOW all my newest music is grayed out on my iphone with the sync icon next to them but wont download at all. 
    BTW, all the music I'm having toruble with shows as (10/1/12) as the "date added" date but the last time i downloaded anything was (9/26/12).
    Not sure what to think about all this??

    These are both great help to me, While I would love to continue hearing more tips I do have a question to add which you may know the answer to.
    When using the trim tool   to make a video shorter or longer, because when setting the in and out points i can't make them exact until it's on the timeline, can you shorten or lenghthen it per frame, like when using the alt key to move the video, instead of dragging with the mouse?
    Thanks so much (:

  • Help with printing static page on even pages of dynamic form

    Hi folks in the OD universe!
    I am relatively new to OD and I am trying like the dickens to get a form to duplex in a very specific way. I have slogged through all of the messages on duplexing and related issues, but haven't seen a solution that fits my problem.
    I have an page of instructions that needs to print on the even (or odd don't really care as long as it is always there) pages of an existing dynamic PO form (with 4 subgroups - header, detail header, data, and footer).
    So I made a working copy of the PO form and added the instructions page. My first thought was to try and use the instructions page as an extra footer piece, so I pointed to it from the footer on the old PO form in the At End-Of-Page part of the subform thing and then pointed the instruction page back to the headers of the PO form so it could continue on. Right now, the instructions are on page 1, so it prints the instructions, then the first page of a PO, then a bunch of instruction pages (infinite - I have to cancel the job on the printer). Making it duplex was the easy part.
    So is this possible using the Subform Page Full and At End-Of-Page stuff or do I need to do some scripting to accomplish this (if so, any ideas on how to proceed). I am trying to make multi-page POs have the instructions on the front or back of each page of the PO.
    Any advice on how to tackle this would be appreciated. I am going to continue my efforts and will reply to this thread once I figure something out.
    Cheers!
    Lucas

    Hi Lucas,
    The information below is from the print_ag.pdf which can be found on your server in the documentation directory
    \checksurface (Duplex Mode and Surface)
    Format
    \checksurface
    To check which surface of a page is currently printing, use the \checksurface command.
    \checksurface detects the current print surface and causes a group event handler to activate.
    Depending upon the actual surface, the event handler is one of:
    A typical use for \checksurface is to force the printer to switch to a new front page when
    printing in duplex mode, by conditionally inserting a blank surface on the back of the current
    page. For example:
    ^define group:SECTION \checksurface\page1\fieldPOS
    ^define group:SECTION!DuplexFront \page3
    Here the group SECTION uses the \checksurface command to determine the current duplex
    surface. The event handler for the !DuplexFront event activates when the current print surface
    is a front page. The event handler inserts page 3 from the current template as a filler surface on
    the back before moving to page 1 on the next front surface. As a result, the new page 1 will be
    on a duplex front surface, regardless of whether the previous page was a front or a back
    surface. The filler surface may be entirely blank, contain static text, such as “This page
    intentionally left blank”, or contain fields which are filled by global definitions active at the time
    \checksurface is used. It may also contain a dummy field that can trigger a !FieldNotAvail
    event specific to the insertion. In any case, Intelligent Pagination commands directly
    referencing fields on that page should not be depended on, because the page is only
    conditionally inserted.
    For another method of performing surface specific processing, see “$duplexsurface (Duplex
    Mode and Surface)” on page 281.
    Regards,
    Matt

  • Help with muse - deleted pages appearing when published

    Hi there!
    I published my website through Muse, then later in design mode deleted certain pages, and then re-published the website. Problem is, the old pages are still published, and appearing in search results and through links in my page.
    Are you able to help please? Is there a setting I tick when publishing the site to avoid this?
    Thank you in advance
    Huey

    Aside - Where are you Publishing to? Is it to the Adobe BC host?
    Try a Export to HTML then look in that folder and see if the deleted xxxxx.html files are listed.
    I just tested a site with 2 pages - Note .html files in exported folder >>
    Then I deleted the untitled-4.html - Re-exported -  and >>
    Note - untitled has been deleted.

  • Pages help with removing "facing pages" margins

    howdy!
    having trouble with removing the "facing pages" function. read the post on 1-up vs 2-up and i selected 1-up and unclicked "facing pages" but my margins still show the large gray area to left and right respectively. i would like to re-set to normal 1 inch margins all around but system doesnt seem to revert back to this function. please help - i dont want to recreate this entire document!
    gracias
    powerbookg4   Mac OS X (10.4.8)  

    Welcome to Apple Discussions
    I would think what you tried would have fixed it, so there has to be something elsewhere. Did you check the margins in the layout inspector?

  • Help with Very Large Pages

    I am designing a layout for a Renga Haiku series.  I have 100 haiku that will be printed two/page on pages 4 5/8" wide.  These "pages" will then be printed side by side on a roll of mulberry paper, resulting in a scroll that is 231.25" (50 X 4.625").  Then they will be according folded and bound (see diagram below).
    I'm hoping someone can help me lay this out so that it can be printed on the roll.  I could treat this as one giant "page" that is 231.25" wide.  But InDesign says the max page width is 216".  Alternatively, I could create pages that are 4 5/8" wide.  But then I can't figure out how to print them one right after the other on the roll.  Is there a way to tell InDesign to simply print all fifty pages, one right after the other, with no space in between?

    There are really two approaches that you can take.
    (1)     Scale everything down by a certain percentage and then scale it up at print time (preferably export PDF and then scale when printing the PDF). If you example you use a 75% scale, use that scale factor for everything including column widths, text point sizes, etc.
    (2)     My preference would be to create this as one hundred logical pages, each 4.625" in width. Output as PDF and leave the “imposition” to whoever is doing the final print job. You could also use one of a number of Acrobat plug-ins from third parties to do that impositon to make the two physical wide pages from the 100 logical pages.
              – Dov

  • Help with start up page

    Why everytime I open indesign or any of the cs programs it doesn't open a new blank document but opens a previously worked on file? How do i get just a normal blank white page when i open programs?
    Sorry to bother yall with something so sinple

    Does this help?

  • Need help with centering my page

    I have done everything I can think of, including going through the many posts here to try and correct this with no luck
    Please look at:
    http://ebnerproductions.com
    and
    http://ebnerproductions.com/index2.htm
    The first was built with basically just html.
    The 2nd was done "properly" I believe with CSS and HTML. The 2nd also has "div - #wrapper"
    left and right margins are auto also... nothing changed.
    Do I need to change something in the CSS from absolute, to fixed or inherit?
    I am completely lost at this point and really really need help.
    Thank you again in advance....
    Adam Ebner

    Your CSS is corrupted -
    :visited {
        color: #6CF;<meta name="keywords"
    (note the appearance of the meta tag within the :visited selector)
    Fix that.
    Then you would need to add this rule to the fixed CSS by changing this -
    body {
        background-color: #EBEBEB;
        background-image: url(BG.jpg);
        margin-left: 75px;
        margin-top: 75px;
        background-repeat: no-repeat;
    to this -
    body {
        background-color: #EBEBEB;
        background-image: url(BG.jpg);
        margin-left: 75px;
        margin-top: 75px;
        background-repeat: no-repeat;
        width:1346px;
        margin:75px auto;
    Then ask yourself how many people will even see this page center since 1346 is way wider than the average browser viewport width on most systems.

  • I need help with an auto-page advance.

    I'm sure I'm doing something wrong. I have a program with 32 pages. Each page is a movie clip with text and images (with motion tweens) and sound. I want one page to play, then the next to play, etc. I have a stop(); at the last frame of each page_mc to kep it from looping. I tried this code butit does not work:
    page01_mc.addEventListener(Event.COMPLETE,nextPage);
    function nextPage(event:Event):void
    gotoAndStop("page02_mc");
    Help! (PS: I'm a novice at Flash CS4 and AS3)

    What you can try is to dispatch an event at the end of each movieclip and have listners waiting for the event for each as you move down the timeline.  For instance, let's say each frame of your main timeline is a different page movieclip.  At the end of each movieclip place this line of code:
    dispatchEvent(new Event("START_NEXT"));
    Then, on the main timeline, for each frame you create an event listener for the current mc.  If your first mc instance name was mc1, then in its frame you would have...
    mc1.addEventListener("START_NEXT", playNext);
    And since the timeline is arranged one mc per frame, the playNext function could be made generically so that all movies could use it...
    function playNext(e:Event):void {
    play();
    Since you are using frame labels, then you would probably devise some other means for advancing, but the same dispatch/listener scenario could still drive the call to move on.

Maybe you are looking for