Apply script on specific pages only

Hi!
I would like to know how to apply some script on specific pages only.
I would like to apply it on pages number 4 to 50 on a 50 page project, and so exclude page 1, 2 and 3.
Here is my actual script:
var doc = app.activeDocument,
objStyle = doc.objectStyles.itemByName('stylenamechosen'),
a = doc.allGraphics,
i = a.length;
while( i-- ) a[i].parent.appliedObjectStyle = objStyle;
Please let me know.

Dear Jump_Over,
Sorry for the delay...
//below code working fine
var myDoc = app.activeDocument;
var myGraphics = myDoc.allGraphics;
for(k=0; k<myGraphics.length; k++)
    myGraphics[k].parent.appliedObjectStyle = myDoc.objectStyles.item("testing");
//below code not working with page range
var myDoc = app.activeDocument;
var myGraphics = app.activeDocument.pages.itemByRange(3, -1).allGraphics;    //Error found in this line
for(k=0; k<myGraphics.length; k++)
    myGraphics[k].parent.appliedObjectStyle = myDoc.objectStyles.item("testing");
Document having 10 pages.
Thanks
Beginner

Similar Messages

  • Email specific pages ONLY from PDF

    Is there a way to extract and email only specific pages from a LiveCycle designed, Reader-enabled PDF using Adobe Reader 8? (i.e. the form has 20 pages total, but I only want the user to email Page3, Page5, and Page7 at once using a button)...
    Thanks in advance for the help...

    I think the only option would be to hide the pages.
    pageName(or subForm).presence = "hidden";
    and then after the email routine finishes show the pages again.
    pageName.presence = "visible";
    If you had all the pages you want hidden in one subform then it would just be one line of code.

  • Smartforms: Option of Printing Specific Pages Only

    Dear forum-ers,
    I have a requirement to print several agent statements in smartform based on the logic from the print program. Each of the page for the single form have a unique statement. Under different scenarios, the form must print out different page combinations as stated below:
    Scenario 1: Page 1, Page 3
    Scenario 2: Page 1, Page 2, Page 3
    Scenario 3: Page  3, Page 4
    Can the above be achieved using one single form? There is no option found in smartform to print only selected pages based on certain conditions. Please advice.

    Take for example, my smartform should have 4 pages. Each page represents different statement. So each page will have its own main window to cater for the data to be printed out.
    Page 1: Statement 1
    Page 2: Statement 2
    Page 3: Statement 3
    Page 4: Statement 4
    Page & Windows
    ============
      Page1
        Window1 [Attributes: Next Page = Page2]
           Command Node1 [Attributes: Goto New Page = Page2]
      Page2
        Window2 [Attributes: Next Page = Page3]
           Command Node2  [Attributes: Goto New Page = Page3] 
      Page3
        Window3 [Attributes: Next Page = Page4]
           Command Node3  [Attributes: Goto New Page = Page4]
      Page4
        Window4 [Attributes: Next Page = Page4]
           Command Node4  [Attributes: Goto New Page = Page4]
    The problem is the smartform only prints page 1 and page 2 only. I want the smartform to print out all four pages in sequence.

  • Password protect specific pages, not whole site

    Hi,
    I use iWeb to publish my website, and I do have a .Mac account. I know how to password protect the entire site, but I want to know if I can protect specific pages only.
    According to this website (http://www.kenstone.net/fcphomepage/iwebstone.html) I can, but I haven't figured out how.
    I guess a workaround would be to publish several sites, but I was wondering if I can avoid that.
    Any help would be appreciated. Thanks!

    According to this website (http://www.kenstone.net/fcphomepage/iwebstone.html) I can, but I haven't figured out how.
    Sorry, no. The sentence on that page that says you can password protect a page is simply wrong. You can only protect a site. Of course a site can consist of only one page.

  • How do I apply a Script to Master Pages?

    Hello,
    Please can anyone tell me how to run or edit this script correctly?
    I have a simple Find and Replace script that ran perfectly on CS2. Now I am running in CS4 and only the first part of the script works which applies the documents pages, but the second part, which applies to the master pages, does not.
    I tried running the CS2 script from “Adobe\InDesign\Version 6.0\en_US\Scripts\Scripts Panel\Version 4.0 Scripts” and it still does not work on the master pages.
    Thank you!
    // Dialog box request Section Information
    var mySectionName = prompt ('What is the Section Title?', 'Title', 'Assign Section Title');
    var myCompanyName = prompt ('What is the Client Company Name?', 'Title', 'Assign Company Name');
    // Create section template by applying Section Name
    app.findPreferences = app.changePreferences = null;
    // Document Pages - Apply Section Title
    app.activeDocument.search('Section Name', false, true, mySectionName);
    // Master Pages -  Apply Company Name
    app.activeDocument.search('Company Name', false, true, myCompanyName);

    Oops! I failed to notice this.
    // Dialog box request Section Information
    var mySectionName = prompt ('What is the Section Title?', 'Title', 'Assign Section Title');
    var myCompanyName = prompt ('What is the Client Company Name?', 'Title', 'Assign Company Name');
    app.findTextPreferences = app.changeTextPreferences = null;
    app.findChangeTextOptions.caseSensitive = true;
    app.findChangeTextOptions.wholeWord = false;
    app.findChangeTextOptions.includeMasterPages = true;
    // Document Pages - Apply Section Title
    app.findTextPreferences.findWhat = 'Section Name';
    app.changeTextPreferences.changeTo = mySectionName;
    app.activeDocument.changeText();
    // Master Pages -  Apply Company Name
    app.findTextPreferences.findWhat = 'Company Name';
    app.changeTextPreferences.changeTo = myCompanyName;
    app.activeDocument.changeText();
    app.findTextPreferences = app.changeTextPreferences = null;

  • User access only to a specific page

    I have create a page group with others pages.
    I create a user who want to have management rights only to a specific page of the portal, and anywhere else
    How can i give access only to a specific page?
    thanks

    Try this :
    1. Edit the page
    2. Click "Access" in the banner at the top of page.
    3. Under "Access Settings" select "Specify Access Settings"
    4. Enter the username into the "Grantee" text box
    5. Select "MANAGE" from the drop down box of permission levels
    6. Click "Add"
    7. Click "Apply"
    8. Click "Clear Cache" to activate the changes
    9. Click "Ok" to return to the page.

  • How do I set a Phase Listener to only run for a specific page?

    How do I set a Phase Listener to only run for a specific page?
    I understand that a Phase Listener runs for ever page in the application, however I want a phase listener to only run for one page at the beginning of the application.
    I discovered I can't use a Filter, because the JSF Application instance always returns null.
    Thus, I thought a Phase Listener would be a good approach.
    Thoughts?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I have moved forward with checking the requested URI...
    (shivers)
    Thanks,
    --Todd                                                                                                                                                                                   

  • Open multi page pdf specific page in Illustrator CS4 with apple script

    I need to open multi page pdf specific page in Illustrator CS4 with apple script. Is it something like this:
    activate  (open file theTargetFolder as PDF with options …).
    Thank you.

    Carlos,
    Muchas Gracias por tu colaboración y excelente script, el que se abra el ESTK no tiene mayor importancia.
    El caso es que Adobe recomienda encarecidamente NO utilizar Illustrator para editar PDFs, por diversas razones, aunque cuando no hay otro remedio o herramienta disponible, o conocida ...
    Para llegar aquí, aparte de San Google, hay que ir a Adobe.es (en mi caso), pestaña de Ayuda,  ..... (hasta aqui bien),
    luego hay que bajar hasta el final y ver Comunidad y Foros...... (esto puede ser)
    al pulsar aparacen un montón de foros se supone de programas pero en inglés,
    y la última línea es de International Forums,  ya casi hemos llegado)
    pulsamos entonces, y por fin se abren cuatro palabras con idiomas, en una dice: español      (casi no me lo puede creer)
    pincho y llego por fin aquí.
    Muy poca gente sabe de la existencia de este pequeño refugio, si a esta dificultad añadimos la peculiar forma de ser de la gente, ....

  • Only publish specific pages

    How do I only publish specific pages and mark some not to be published to save time when uploading / have some pages which I keep but don't have up online? Thank you!!

    Are you publishing to MMe or to a folder and using ftp to upload?
    When you publish to MMe, iWeb will publish your whole site. If you want to hide pages that you are still working on, then just go to Inspector and Pages and click do not show page in navigation menu and it will not be shown.
    With ftp, I think you have to upload the whole site folder, but there are some ftp programs out there that will allow you to upload individual pages. Again, hide the page and take it out of the nav menu.

  • Every time I open Firefox or open a page in a new tab, I get the error message that a script on this page is not responding or has quit working. This has only happened since I upgraded to 5.0.

    Even when I start firefox I have to sit here and wait for it to tell me a script on this page is not responding or has quit working. Once that happens which takes a while, I can say stop script and it moves on. I've always liked using firefox and have never had a problem in the past, however if I can't get this particular problem fixed, and I've tried many ways to do this, I may have to change to another browser. I would hope that you could find out why this is happening to me before I make that decision. One other thing, I am using the dreaded Vista OS.

    Try the Firefox SafeMode. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    # You can open the Firefox 4.0 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    # Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • Use XMLP to pull only specific pages from larger PDF template?

    We need to be able to pull specific pages or a range of pages out of a larger template to use to merge data into and return to users or the selected delivery method. I've seen a lot of information about how to add page numbers to PDF templates / documents, but nothing about how I can pull out specific pages. We know this can be done using iText or some other technology, but does anyone know if this can be done using XML Publisher at all? This is a big issue for us and could determine whether we end up using XMLP at all or go with something else. Any info would be helpful.
    Thanks!

    Hi
    Publisher is not currently capable of pulling out specific pages from a given PDF,.
    Regards, Tim

  • Dynamic Form - Barcode on master page, only contents on specific page to be populated on barcode

    We have a dynamic form that grows as required. We have one barcode on the master page. As form grows to next page only the contents on that page (ie page 2) must be on the barcode on page 2 and page 1 content only on page 1. But if the form goes back to normal then the contents must not be on the barcode anymore.
    Could anyone assist on this problem please?

    Hi Brad ,
    For your issue, you can view the Upgrade Status page in Site Settings to verify that upgrade has succeeded for a site collection.
    To view upgrade status in Site Settings 
    1.Verify that the user account that performs this procedure is a site collection administrator.
    2.On the Site Settings page for the site collection, in the Site Collection Administration section, click Site collection upgrade.
    3.On the Site Collection Upgrade page, click Review Site Collection Upgrade Status.
    4.The Upgrade Status page for the site collection is displayed.
    For more information, see
    Manage site collection upgrades to SharePoint 2013
    Also you can  go to _layouts/15/reghost.aspx (Site Settings -> Site Actions -> Reset to site definition) and reset the master page gallery to site definition version.
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Open pdf to specific page is working in XP but not Vista

    Hello,
    I have a Flash project consisting of multiple pages. On each page there is a link that will allow the user to open a pdf to a specific page to supplement the information contained in the Flash page.
    To do this I am attaching the following script to the button on each page:
    on (release) {
        getURL("My document.pdf#page=37");
    This works fine in Windows XP. I can navigate to different pages in Flash and open a different page in the pdf each time.
    It is not working for me in Vista. What it does in Vista is the first time you click on the button it will open the pdf to the specified page. The problem is that if you hit that button again or navigate to another page and click on that button to open another page in the pdf, it opens the pdf but only to the first page and ignores the specified page request.
    The project will be running from a cd only.
    Any help will be greatly appreciated.
    Thanks,
    Jeff

    Suggest you check the pages against the W3C Validator and eliminate the errors:
    http://validator.w3.org/
    e.g. the upper cheeks page has mangled code including three closing </head> tags (lines 31, 88 and 176) which IE and Chrome are probably barfing on.

  • How to print specific pages out of a book file

    I've searched around but I cannot find any way of printing specific pages out of a book file. Has anyone got any ideas? I have a 100 page book file with 20 files, and doing print outs of sections is a nightmare. I want to be able to print page 5 out of file A and page 6 out of file B together so I can duplex them. I've tried scripting this but I can't seem to set the page range of the print preferences of the book file.

    [Jongware] wrote:
    I don't think it's possible to set the page range of a Book.printPreferences
    Theoretically it ought to be possible. Can't test for myself now; what does happen when you set the pageRange to overlapping sub-files?
    I've just tried it with CS3. It might have been implemented in later versions.
    In the print Book dialogue the page range field is disabled. You cannot enter anything there.
    If you try to do it with a script it says that printPreferences is read only.

  • Insert OMR mark to specific page

    I want to be able to add an OMR mark to the second to last page of all my PDFs. This mark will alert the rollfed press that it is the end of the docuement. I have the image file but don't know how to place it in the document and how to stipulate which page to place it on. The documents don't all have the same amount of pages. Can I do this using javascript?

    I tried to create an actionlist. It wouldn't allow me to place it on the second to last page. It either wanted specific page numbers, first or last page or ranges of pages. I wanted to create a javascript that way I could apply it to only the second to last page.
    Is this possible? The watermark tool has the same page functions as the actionlist so it doesn't work for what I need.

Maybe you are looking for

  • GL account for FI document from sales

    Dear Experts, I have requirement to group line item in FI document generated by SD billing. Details of my Sales pricing procedure as follows: 1. PR00                              ERL (account key) 2. ZB00 (discount)               ERS (account key) I

  • I upgraded to Mountain Lion and now I can not use Mac Office

    I updated to Mountain Lion and now Microsoft Office does not work

  • No other devices showing up under Home Sharing

    Hello, I have home sharing activated on both my computers and I am logged in with the same username.  However, once I turn on homesharing on both computers nothing happens.  There are no libraries showing up for me to sync between the computers.  I h

  • Problems with viewlink

    I have been having some problems with a viewlink lately. First it wouldn´t make the where clause and I got a message saying it was restoring the default where clause and an empty field for the view link where clause. After restarting Jdeveloper and t

  • I am a bit lost.

    I have been using Rapidweaver and making websites for a good while. I came across this website: Ensemble I have my own image and my content created. Is it hard to do this in flash? ie, import my picture and set different categories, ie home, about, m