Script add/delete master page automatically

I've searched and haven't managed to find one so apologise if this has been asked before.
Adobe Indesign CS2
Does anyone have a script to automatically insert, or delete my master page with an automatic text link between the frames on my pages, as I am loosing too much time adding and deleting manually. The page is my 'A-Master'
I have never installed a script before, nor know how to but I must invest time in this as it will save me lots of time in the future with the programming behaving like a word processor (microsoft word) with the beauty of the design elements with indesign.
Regards

Are you looking for some sort of feature that adds pages and link the text automatically as you type and reach the end of a page? That isn't going to happen in CS2, even with a script, as far as I know. There might be a plugin available, but it won't be free.
You'd be better off upgading while you still can get upgrade pricing. Smart Text Reflow was introduced in CS4 and does exactly what I think you want.

Similar Messages

  • Delete Master Page?

    Is there a way to delete Master Page designs in Aperture books? I want to narrow my choices of Master Pages. I know how to add new ones, but how do I delete some of them?
    Kevin

    Is there a way to export/share custom master pages that are created?
    i have found that the default set is located at:
    user/Library/Application Support/Aperture/Book Themes/MyPublisher Theme/Pages
    Note, that 'MyPublisher Theme' is what i named my custom theme within Aperture.
    Any help appreciated.

  • Script for switching master pages

    Would it be possible to write a script to do this: Replace one master page with another whenever a certain paragraph style appears? I'm looking for a quick way to replace my A Master (with running header and page number) with the None Master on pages where new chapters begin.
    Clark

    here you go (it also creates sections)
    var ProgressBar = function(/*str*/title){
         var w = new Window('palette', ' '+title, {x:0, y:0, width:340, height:60}),
              pb = w.add('progressbar', {x:20, y:12, width:300, height:12}, 0, 100),
              st = w.add('statictext', {x:10, y:36, width:320, height:20}, '');
         st.justify = 'center';
         w.center();
         this.reset = function(msg,maxValue)
              st.text = msg;
              pb.value = 0;
              pb.maxvalue = maxValue||0;
              pb.visible = !!maxValue;
              w.show();
         this.hit = function() {++pb.value;};
         this.hide = function() {w.hide();};
         this.close = function() {w.close();};
    function main(){
    var doc = app.documents.item(0);
    // Create a list of paragraph styles
    var list_of_paragraph_styles = [];
    var all_paragraph_styles = [];
    var list_of_masters_names=[];
    var list_of_masters=[];
    for (var i= 0; i<doc.masterSpreads.length;i++){
        list_of_masters_names.push(doc.masterSpreads[i].name);
        list_of_masters.push(doc.masterSpreads[i]);
    list_of_masters_names.push("undefined");
    doc.paragraphStyles.everyItem().name;
    for(var i = 0; i < doc.paragraphStyles.length; i++) {
               list_of_paragraph_styles.push(doc.paragraphStyles[i].name);
               all_paragraph_styles.push(doc.paragraphStyles[i]);
    for(var i = 0; i < doc.paragraphStyleGroups.length; i++) {
              for(b = 0; b < doc.paragraphStyleGroups[i].paragraphStyles.length; b++) {
                        list_of_paragraph_styles.push(doc.paragraphStyleGroups[i].name+"->"+doc.paragraphStyleGroups[i].paragraphStyles[b].name);
                        all_paragraph_styles.push(doc.paragraphStyleGroups[i].paragraphStyles[b]);
    // Make the dialog box for selecting the paragraph styles
    var the_dialog = app.dialogs.add({name:"Section start at paragraph style:"});
    with(the_dialog.dialogColumns.add()){
              with(dialogRows.add()){
                        staticTexts.add({staticLabel:"Find:"});
              with(borderPanels.add()){
                        var find_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
    with(dialogRows.add()){
                        staticTexts.add({staticLabel:"Apply Master:"});
              with(borderPanels.add()){
                        var change_master = dropdowns.add({stringList:list_of_masters_names, selectedIndex:0});
                        staticTexts.add({staticLabel:"Select \"undefined\" not to change"});
    the_dialog.show();
    // Define paragraph styles
    var myParagraph = all_paragraph_styles[find_first_paragraph.selectedIndex];
    var myMaster=(list_of_masters_names[change_master.selectedIndex]!="undefined")?list_of_masters[change_master.selectedIndex]:null;
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = myParagraph;
    var myFound=doc.findGrep();
    var i=myFound.length;
    var pBar = new ProgressBar("Sectioning");
         pBar.reset("Rabdare...", i);
    while (i--)
            pBar.hit();
            if (myFound[i].parentTextFrames[0].parent.constructor.name=="Character"){
                var myPage=myFound[i].parentTextFrames[0].parent.parentTextFrames[0].parentPage;}
            else{
         var myPage=myFound[i].parentTextFrames[0].parentPage;}
         var mySection;
         if (myPage.appliedSection.pageStart==myPage){mySection=myPage.appliedSection;}
         else{
         doc.sections.add(myPage,{pageNumberStart:1})};
        // mySection.pageStart=myPage;
         //mySection.pageNumberStart=1;
         if (myMaster) {myPage.appliedMaster=myMaster};
    alert("Acum e gata!!");
    app.doScript('main()',undefined,undefined,UndoModes.entireScript,'AutoSections');
    //main();

  • Haw to restore deleted master page object

    If I apply Master Page to some page an then override and delete some object which originates on master page - is there any way to bring it back again with scripting?
    I'd like to avoid reapplying Master Page  - becuse I don't wat to reset overridden attributes other master page objects.

    Most properties can be stored and applied using the "properties" property.
    Depending on the content type, you will need to handle it differently. FWIW, here's some code that will apply properties from one text frame to another. For content you would need to either move/copy the text or thread the frame.
    function applyProperties(origin,target){
        target.appliedObjectStyle=origin.appliedObjectStyle;
        target.properties = GetTextFrameProperties(origin)
        target.textFramePreferences.properties=origin.textFramePreferences.properties;
        target.textWrapPreferences.properties = origin.textWrapPreferences.properties;
    function GetTextFrameProperties(frame){
        var frameProps = frame.properties;
        var e;
        //frame = frame.properties;
        var properties = {}
        for( var x in frameProps){
            switch (x){
                //case
            //appliedObjectStyle:frame.appliedObjectStyle,
    //~        contentType:frame.contentType,
                case "cornerRadius":properties.cornerRadius = frameProps.cornerRadius;break;
                case "fillColor": properties.fillColor  = frameProps.fillColor;break;
                case "fillTint": properties.fillTint = frameProps.fillTint;break;
                case "gapColor": properties.gapColor = frameProps.gapColor;break;
                case "gapTint": properties.gapTint = frameProps.gapTint;break;
                case "horizontalScale": properties.horizontalScale = frameProps.horizontalScale;break;
                case "itemLayer": properties.itemLayer = frameProps.itemLayer;break;
                case "label": properties.label = frameProps.label;break;
                case "rotationAngle": properties.rotationAngle = frameProps.rotationAngle;break;
                case "shearAngle": properties.shearAngle = frameProps.shearAngle;break;
                case "strokeAlignment": properties.strokeAlignment = frameProps.strokeAlignment;break;
                case "strokeColor": properties.strokeColor = frameProps.strokeColor;break;
                case "strokeTint": properties.strokeTint = frameProps.strokeTint;break;
                case "strokeType": properties.strokeType = frameProps.strokeType;break;
                case "strokeWeight": properties.strokeWeight = frameProps.strokeWeight;break;
                //textWrapPreferences: properties.frameProps.
                case "verticalScale": properties.verticalScale = frameProps.verticalScalebreak;
                case "allowOverrides": properties.allowOverrides=frameProps.allowOverrides;break;
                case "absoluteHorizontalScale": properties.absoluteHorizontalScale=frameProps.absoluteHorizontalScale;break;
                case "absoluteRotationAngle": properties.absoluteRotationAngle=frameProps.absoluteRotationAngle;break;
                case "absoluteShearAngle": properties.absoluteShearAngle=frameProps.absoluteShearAngle;break;
                case "absoluteVerticalScale": properties.absoluteVerticalScale=frameProps.absoluteVerticalScale;break;
                case "dataStore": properties.dataStore=frameProps.dataStore;break;
                case "endCap": properties.endCap=frameProps.endCap;break;
                case "endJoin": properties.endJoin=frameProps.endJoin;break;
                case "gradientFillAngle": properties.gradientFillAngle=frameProps.gradientFillAngle;break;
                case "gradientFillLength": properties.gradientFillLength=frameProps.gradientFillLength;break;
                case "gradientFillStart": properties.gradientFillStart=frameProps.gradientFillStart;break;
                case "gradientStrokeAngle": properties.gradientStrokeAngle=frameProps.gradientStrokeAngle;break;
                case "gradientStrokeLength": properties.gradientStrokeLength=frameProps.gradientStrokeLength;break;
                case "gradientStrokeStart": properties.gradientStrokeStart=frameProps.gradientStrokeStart;break;
                case "javascript": properties.javascript=frameProps.javascript;break;
                case "leftLineEnd": properties.leftLineEnd=frameProps.leftLineEnd;break;
                case "localDisplaySetting": properties.localDisplaySetting=frameProps.localDisplaySetting;break;
                //properties.locked=frameProps.locked;
                case "miterLimit": properties.miterLimit=frameProps.miterLimit;break;
                case "nonprinting": properties.nonprinting=frameProps.nonprinting;break;
                case "overprintFill": properties.overprintFill=frameProps.overprintFill;break;
                case "overprintGap": properties.overprintGap=frameProps.overprintGap;break;
                case "overprintStroke": properties.overprintStroke=frameProps.overprintStroke;break;
                case "rightLineEnd": properties.rightLineEnd=frameProps.rightLineEnd;break;
                case "strokeCornerAdjustment": properties.strokeCornerAdjustment=frameProps.strokeCornerAdjustment;break;
                case "strokeDashAndGap": properties.strokeDashAndGap=frameProps.strokeDashAndGap;break;
                case "cornerEffect": properties.cornerEffect = frameProps.cornerEffect;break;
                case "featherCornerType": properties.featherCornerType = frameProps.featherCornerType;break;
                case "featherMode": properties.featherMode = frameProps.featherMode;break;
                case "featherNoise": properties.featherNoise = frameProps.featherNoise;break;
                case "featherWidth": properties.featherWidth = frameProps.featherWidth;break;
                case "isolateBlending": properties.isolateBlending = frameProps.isolateBlending;break;
                case "nonprinting": properties.nonprinting = frameProps.nonprinting;break;
                case "opacity": properties.opacity = frameProps.opacity;break;
                case "shadowOpacity": properties.shadowOpacity = frameProps.shadowOpacity;break;
                case "shadowSpread": properties.shadowSpread = frameProps.shadowSpread;break;
                case "shadowXOffset": properties.shadowXOffset = frameProps.shadowXOffset;break;
                case "shadowYOffset": properties.shadowYOffset = frameProps.shadowYOffset;break;
                case "cornerOption": properties.cornerOption = frameProps.cornerOption;break;
                case "flip": properties.flip = frameProps.flip;break;
                case "absoluteFlip": properties.absoluteFlip = frameProps.absoluteFlip;break;
        return properties;
    Harbs

  • How do I add an portal page automatically?

    I have never with Oracle Portal. I am an Ajax Developer.
    I want to be able to make ajax calls to:
    1. create a page
    2. get the layout id
    3. get the region ids for a layout
    Is this possible via PL/SQL built-in? I don't want to start writing server code.
    Sorry we don't have a server-side developer on the team.
    -P

    It depends on which type of document you started with. There are two types, word processing and page layout document's. You can the them on the left when you open File > New from Template chooser
    Word processing documents will add pages automatically as you write along or add objects that are inline. You can also add by clicking on the Section icon in the tool bar. This will also add a section break in the document.
    Page layout documents pages has to be added manually by either using Insert > Pages > choose from the options. Or use the Page icon in the tool bar.
    To learn more about Pages 09 download the Pages User Guide from your Pages Help menu.

  • InDesign CS5 keeps crashing when I try deleting master pages.

    I am working on a CS4 template (converted to CS5) and each time I try deleting a master page, InDesign crashes. I have also tried the Adobe InDesign 7_0_3 Patch All update but it has not helped. Any tips?

    That worked! Thanks for the tip

  • Apple Script to delete old emails automatically

    I couldn't figure out a way to automatically delete emails in one specific folder, based upon how old they were. I only wanted to keep them up to 15 days old. I have my security cam's motion alerts clips sent directly to a specific email folder. It is saved on mac server for safety. I searched all over and finally found http://applescripts.thompson-solutions.com/applescript.php?id=40
    This apple script is awesome! It lets you pick how old you want to delete, and what folder.
    This guy will get you any script you need, and they are great to deal with.

    Account information is kept in NetInfo, a complex system database. If you just delete a home folder the account will still exist, and a new home folder will be created the next time a user logs into it.

  • How can I create a custom feature, which will automatically take a custom master page while creating a site ?

    Hello ,
    I am new in Sharepoint development . I am trying to create a Sharepoint feature to Activate master page automatically while creating the site .Below mentioned code I am using to do this . 
    But When I am creating any site under site collection .It is not applying automatically . I have to manually Activate that feature . 
    SPSite site = properties.Feature.Parent as SPSite;
    SPWeb rootWeb = site.RootWeb;
    Uri masterUri = new Uri(rootWeb.Url + "/_catalogs/masterpage/mycustom.master");
    rootWeb.MasterUrl = masterUri.AbsolutePath;
    rootWeb.CustomMasterUrl = masterUri.AbsolutePath;
    rootWeb.Update();
    How Can I create a feature that can activate the master page at same time of site creation under Site collection ,Without any manual work .. 
    Thanks in Advance .. 

    Hi,
    You can associate master page during feature activation as follows:
    http://social.technet.microsoft.com/wiki/contents/articles/19933.sharepoint-2010-set-a-custom-master-page-during-feature-activation.aspx
    Then, you can use feature stapling to apply automatically on site creation:
    http://blogs.msdn.com/b/kunal_mukherjee/archive/2011/01/11/feature-stapling-in-sharepoint-2010.aspx
    Thanks,
    Avni Bhatt

  • Dynamic script in master pages

    hi,
    does anybody know how (if possible)  to
    write dynamic script in script editor
    in  master pages.
    thanks in advance,

    ami

  • Automatically insert new master pages

    I'm trying to insert new master pages automatically in indesign cs5.5. I have a two page side by side masters. Anyone know how I can do this?

    Precise Formwork wrote:
    Thanks I have that selected. All that happens is red + to link to another page. I then have to manually drag more masters and link by hand again. Am I missing something here? This is just the same as old version.
    I've found Smart Text Reflow useful for working like a word-processor, but it's tricky to set it up right and to stay alert to not inadvertantly changing settings that can create confusing behavior. Once you establish a stable workflow for your needs, it will repay the learning effort.
         Search Google for terms like "InDesign tutorial smart text reflow" without quotes for useful links.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices    

  • Create a custom Master Page in SharePoint Foundation 2013

    Hi,
    I am new to SharePoint foundation.
    I am trying to create a custom master page and save it as template, so that i can use it for all other sub sites. But i don't know where to start. Also i tries searching in Google, i got results for share point and not for share point foundation.
    So, Please give me a step by step procedure or a link to step by step procedure on how to create a master page, save it as template and use it for a sub site.
    Thanks in advance,
    Gowtham R

    Few points to note related to SharePoint Master page:
    You don't need to create master page template. If you deploy your master page in site collection level you can reuse the same master page in subsites without copying again and again, rather just by referencing
    You have not mentioned how you are going to deploy your master page. If you have any Visual Studio (VS) solution already, try to add your  master page in the VS solution and deploy your master page (and other branding components) as SharePoint WSP
    solution.
    Deploying master page will not activate the master page, you need to use some kind of 'Web Level Feature' to activate your branding - the feature will basically set the master page property of SharePoint site to your custom master page.
    Please follow the links below for steps by steps instructions (and you will find many just by googling 'sharepoint master page visual studio'):
    http://frederik.se/how-to-deploy-a-custom-master-page-in-sharepoint-2013-using-visual-studio/
    http://joshuaorimogunje.wordpress.com/2011/10/05/how-to-create-custom-master-page-for-sharepoint-2010-using-visual-studio-2010/
    http://blogs.msdn.com/b/bobgerman/archive/2011/01/31/packaging-master-pages-and-page-layouts-with-visual-studio-2010.aspx
    http://go.limeleap.com/community/bid/291931/Creating-a-Custom-SharePoint-Master-Page-with-jQuery-Using-Visual-Studio
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Can't delete master spread

    Dear All,
    I'm trying to delete a master page but the option DELETE MASTER SPREAD is greyed out.  It is not in use on any page, but still won't let me delete -- any idea why?
    InDesign CC seems to be very quirky!
    Small Town Gal

    If you only have two master pages, that is [none] and A-master,  and you did not use the A-master for some reason, you only use the [none] then you have no option to delete any of those master pages.
    However if you have too many master pages, try to double check if you really did not use a particular master page by going to flyout of Pages -> Master Pages -> Select Unused Masters
    After that go back to Pages -> then Delete Master Pages.
    Hope it helps.

  • "New Document" button on ribbon not working in the "Master Page Gallery" in Internet Explorer 10 & 11

    I'm trying to add a "JavaScript Display Template" to my "Master Page Gallery" but when I click on the "New Document" button and select "JavaScript Display Template" it opens the "Add a master page" dialog
    and prompts me to upload a file.  I've ran into this problem with "Compatibility View" set to both "On" or "Off".  I'm able to upload files but I can't get the new forms to show up.
    This happens on the root site collection site.  For subsites, the "New Document" button is completely grayed out.  
    FYI - I am a site collection admin and in the "Owners" group for each site.
    How can I fix this?

    Hi,
    According to your post, my understanding is that "New Document" button on ribbon falied to work in the "Master Page Gallery".
    In the root site, please make sure you enter all the necessary information when you upload file.
    In the other word, you need to make sure the save the “JavaScript Display Template" successfully.
    In the subsites, when you click the “Master Page” under Master Page Gallery in the sub site site setting page, the "New Document" button is completely grayed out.
    If you want to add the template, you need to active the “SharePoint Server Publishing” feature in the Site sitting->Manage site features.
    However, the “Master Page” under Master Page Gallery will become to “Master pages and page layouts”.
    If you click the Master pages and page layouts”, you will go to the
    Master Page Gallery of the root site, and then you can add Document.
    Thank you for your understanding.
    Thanks,
    Linda Li
    Linda Li
    TechNet Community Support

  • Edit JS Script CS4 (Add XML Tags All pages automatically)

    Hi, all Scripter
    I have a javascript for add xml tags (ETMV2 Pearson, InDesign CS4).  We have select my powermath equation data then run script. Script automatically insert xml tags both side (open/close). But we select one by one then run script its time taking.
    var d=app.activeDocument,
    root=d.xmlElements[0],
    ie = root.xmlElements.add("inlineequation", app.selection[0]),
    im = root.xmlElements.add("inlinemediaobject", ie.texts[0]),
    to = root.xmlElements.add("textobject", im.texts[0]);
    to.xmlAttributes.add("role", "xpressmath");
    Example 1: My powermath equation data (InDesign CS4)
    [&x^{2}+y *frac*{1}{2x}&]
    Select powermath equation data then run javascript below mention. Script insert xml tags.
    <inlineequation><inlinemediaobject><textobject>[&x^{2}+y *frac*{1}{2x}&]</inlineequation></inlinemediaobject></textobject>
    Its time taking and select one by one
    Result:
    My main concern is that is this possible script find open [& and close &] all poermath equation data automatically then insert (add) xml tags all pages.
    Thank/Regard
    snegig

    Hi,
    John Hawkinson thank you so much your suggestion.
    I am new  this type of discusion (on this page). So i think anybody could not replay my answer. So i repost my question.
    I want insert tags in my Indesign CS4 files. Is this posible when i select my powermath equaiton then run script. Script add tags automatically before/after my equation. Please ignore IDML word.
    Yes i an comfortable with XSLT presently i working with Pearson ETMV2.
    I have one more question when i past my snapshot its appear properly but when i agin see my commant then my snapshot disappear (see small blue rectangle).
    Thank you John again i am new in this industry please guide.
    snegig

  • Looking for Scripts that Replaces Text and Master Pages

    I have just found the Script Library panel in FM 10. (Always used InDesign before.)
    I'm up to replace a text string and two master pages in 100+ documents. Tried to google for some nice solutions to make this automatically but cannot find any scripts/macros to FM at all.
    Do you have som tip where to find such script/macro?

    100 is a small enough number that no time may be saved writing a script (assuming none exist for the purpose).
    I'd be tempted to ...
    Create a sourcing file that has the new MPs needed (and safe versions of MPs "Left" and "Right")
    Create a new Book file.
    Add to it all 100 of the files needing update (this is the only tedious part).
    Use Find/Replace from the Book menu to fix the text string.
    Select all book component files:
    File > Import > Formats
    Import from Document [MPsourcefilename.fm]
    [Deselect All]
    [*] Page Layouts
    [Import]

Maybe you are looking for

  • Can we use BLOB fields (that store images) in Crystal Report ?

    I'm developing with ASP.NET, VS.NET 2003. Using Crystal Report for VS.NET DataBase: Oracle 10g I store a BLOB field in a table. This field store images, like jpg files. The Stored Procedure that I use to fill the report is: OPEN MyCursor FOR SELECT M

  • ITunes stopped working on Windows 7

    iTunes stopped working on my PC (Windows 7 Ultimate) when I look at the task manager it appears in the processlist for a few seconds and vanishes!! what is happenening ???               please help I got this from my eventlog. Faulting application na

  • Zero DC balance

    We have post five accounting documents, some are using MYR document currencies, some are using SGD document currencies, company code currency is SGD, when we use SGD to clear five documents, FBL3N line item report shows local currencies for that acco

  • Single Project Won't Load - Eternal Beach Ball - File too large?

    I had just finished putting in the last still image in a project in iMovie last night when all of a sudden, my whole computer crashed. Another friend had been working on the same project on my machine and had mentioned that occasionally iMovie would

  • What's up with Flash function key shortcuts in OSX?

    I'm teaching a class for Flash CS3 on the Mac to about 24 students. I've been using Flash in Windows for a long time, but it's been awhile since I worked on a Mac. Our classroom has about 24 iMacs running the latest OS X (not sure exactly which versi