Paste in place for the next Master unfunction, you can fix it?

Hello world

I got this script, that copies of:

Paste in Place to specify the Master Page

I change it to:

myDialog = app.dialogs.add var ({name: 'Copy to select one item to the next master', canCancel:true});})
{with (MyDialog)}
{with (dialogColumns.Add ())}
staticTexts.add ({staticLabel: "select a master you want to copy in"});
{with (dialogRows.Add ())}
mySelection var = dropdowns.add ({stringList: ["master A", "B Master", "Master C", "Maître D", "master", "Master F", "Master G"], selectedIndex:0});})
}
}
}
If (myDialog.show () is true)

main() {} function
If ("copy to the next Master");
copy_to_next_master();
}
function copy_to_next_master() {}
If (mySelection.selectedIndex == 0) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [0]);
}
}
}
Alert ("done. ("\rWhat you select are glued in place for future documents' Master A");
}
If (mySelection.selectedIndex == 1) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [1]);
}
}
Alert ("done. ("\rWhat you select are glued in place for future documents' Master B");
}

If (mySelection.selectedIndex == 1) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [2]);
}
}
Alert ("done. ("\rWhat you select are glued in place for future documents' Master C");
}

If (mySelection.selectedIndex == 1) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [3]);
}
}
Alert ("done. ("\rWhat you select are glued in place for future documents master-D");
}

If (mySelection.selectedIndex == 1) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [4]);
}
}
Alert ("done. ("\rWhat you select are glued in place for future documents master E");
}

If (mySelection.selectedIndex == 1) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [5]);
}
}
Alert ("done. ("\rWhat you select are glued in place for the next master F documents");
}

If (mySelection.selectedIndex == 1) {}
nSel var = app.selection.length;

for (var i = 1; i < app.documents.length; i ++) {}
var nextDoc = app.documents [i];
If (! nSel) {alert ('nothing selected!'); exit() ;}
for (var n = 0; n < nSel; n ++) {}
var curSel = app.selection [n];
curSel.duplicate (nextDoc.masterSpreads [6]);
}
}
Alert ("done. ("\rWhat you select are glued in place for future documents master G");
}

but unfunction, you can fix it?

Thank you

Teetan

Hello

Editing your code - note that the supposed main() function to be

1. definition and

2 called

Compare it with this code:

#target  indesign
var
  myDialog = app.dialogs.add({name:"Copy Selected item(s) to chosen Master",canCancel:true}),
  mStringList = ["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"];
with(myDialog){
  with(dialogColumns.add()){
  staticTexts.add({staticLabel:"Select a Master you want to copy to"});
  with(dialogRows.add()){
  var mySelection = dropdowns.add({stringList:mStringList, selectedIndex:0});
      }
  }
}
main();

function main(){
  if (!app.documents.length || !app.selection.length)
  {
  alert( "Nothing selected!" );
  exit();
  }
  if (myDialog.show() == true)
  copy_to_next_master();
    }
function copy_to_next_master() {
var
  mChoice = mySelection.selectedIndex,
  mMsg = "Done.\rWhat you select is pasted in place to next documents - " + mStringList[mChoice],
  nSel = app.selection.length,
  mDone = false,
  i,n,nextDoc,curSel;   

for ( i = 1; i < app.documents.length; i++) {
  nextDoc = app.documents[i];
  targetMaster = nextDoc.masterSpreads[mChoice];
  if (!targetMaster.isValid) {
  mMsg += "\rCan't detect " + mStringList[mChoice] + " in a doc: " + nextDoc.name;
  continue;
  }
  mDone = true;
  for ( n = 0; n < nSel; n++ ) {
  curSel = app.selection[n];
  curSel.duplicate( nextDoc.masterSpreads[mChoice] );
        }
  }
mDone ? alert(mMsg) : alert("Nothing copied");
}

Jarek

Tags: InDesign

Similar Questions

  • I broke my screen, and now cannot drag to open it.  I have an alarm that don't go.  I also want to synchronize my phone before I take it buy a new one.  Is it possible to synchronize and watch my calendar for the next few days?

    I broke my screen, and now cannot drag to open it.  I have an alarm that don't go. I can let the battery die I know but I really want to be able to access and examine what are the texts I received today. I think that my ICloud is can be disabled. I also want to synchronize my phone before I take it buy a new one.  Is it possible to synchronize and watch my calendar for the next few days?

    Without entering your access code, it is not possible, unless your time is in iCloud. If this is the case, connect to iCloud.com to check your calendar.

    Good luck.

  • How can I connect on thunderbird so it must be a sign for the next session?

    After reading the email, I don't know how to sign out of Thunderbird. It is not closed and when I click the icon it doesn't require logging to email with my password. How I got disconnect so it requires authentication when I click the icon.

    A master password (for Thunderbird) can be the way to go. Set up and when you open your "Master Password" that opens the password manager will ask you to TB, so she can select your passwords of real connection for different sites.

    While TB is still open, you would usually not to re - enter the password "master." It requires TB be fully closed, then reopened before he asked the password again.

    'Tools - Options - Security - passwords'

    You can delete your IDs e-mail from the password manager, but you can have several - each POP account, each IMAP account, each SMTP account has its own password. My memory isn't good.

    https://support.Mozilla.org/en-us/KB/master-password

    TB38.2 Win10-PC

  • Want Firefox to save your tabs for the next time it starts?

    FF 27.0.1 on Linux Mint XFCE 16, up to date.

    I have my preferences set to "show my home page".

    Whenever I close FF with the X in the upper left corner, he gets up and asks me "do you want Firefox to save your tabs for the next time it starts? I check the box to ask next time and have tried both save and exit and just left. When I open the browser again, it seems to randomly decide to open all the tabs I had last time, or sometimes (rarely) just my home page tabs.

    I don't want to open all the tabs I had open, and I don't want the question whenever I have leave FF. I used FF for years with XP, but I am new to Mint.

    Done setting the prefs 'warnon' on the topic: config false page has an effect any?

    • browser.tabs.warnOnClose
    • browser.tabs.warnOnCloseOtherTabs
    • browser.warnOnQuit

    Make sure that you run not Firefox mode full screen (press F11 or Fn + F11 to toggle; Mac: Command + SHIFT + F).

    If you are in full screen view then hover over with the mouse to the top of the screen to facilitate the bar appear Navigation and tab bar.
    Click the expand (in the top right Navigation bar) to exit full screen or right-click on a space empty on a toolbar and select "exit full screen" or press the F11 key.

  • I bought the live app pga golf, but it doesn't work in my country! How can I cancel the payment for the next month?

    I bought the live app pga golf, but it doesn't work in my country! How can I cancel the payment for the next month?

    There are instructions on this page to manage and stop automatic renewal of subscriptions: view, change or cancel your subscription - Apple Support

  • How can I save my tabs for the next time I open the browser?

    In the previous edition (3.6.12) if I want to close my pc, I had the ability to save my tabs for the next time... I can't find this option in this version.

    Firefox 4.0 automatically saves your session when you close Firefox. Next time you open Firefox, click on the link of the Previous Session restoration on the default on: Home home page or in the menu of the Session previous restore point in the history of menu drop-down.

  • Upgradable GPU? Graphics for the next models?

    Hello!

    I think to buy a satellite M40 that precisely fits my budget. The only problem is the X 300 128 MB graphics card which is in fact the slowest in ATI series x is there a possibility or the possibility of an update of the graphics card or through society, either with an authorized service provider? I know that there is the X 600 in some models that would be a good change from the X 300. The X 300 and X 600 will be available/expandable so that they can be changed? (I know that sounds a little crazy, but some other laptop producers are already doing something similar. But I will not buy another laptop...)

    My second question is about the GPU by Toshiba next models that are coming in the next few months. Does anyone know if Toshiba will keep the X 300 on their models, or if they use a card more strong as the X 600, X 700, or even X 800? I prefer wait a month or so to buy something that I regret buying after a few months.

    Thanks in advance for your help,
    Antonakis

    [Edited by: admin on 30 June 05 07:22]

    Hello Antonakis

    Sorry, but the replacement of the graphic card or same CPU is not possible because the graphics card is fixed on the main map. You can upgrade just RAM or HARD drive.

    One of my friends has the same unit. It's a beautiful machine with display fabulous and beautiful design. If you buy, be careful because tools & utilities CD is not available, and you can create alone. To create your own start the Toshiba Assist and go to Protect & Fix.

    Sorry but I found no information on some future project and new hardware components that can be used in new models of laptops.

    Good luck!

  • How to make appear a message that can enter some settings such as a variable for the next step?

    Hi all

    How to the dialog box or window pop up a message that can input some parameters as a variable for the next step?

    My sense is if Teststand stage can do that, not using Labview or other language.

    Thank you

    BR

    Johnny

    Take a look at the Options of a stage of pop-up Message tab. The response is returned in Step.Result.Response.

  • Idea for the next update for A1 - 810

    I got the idea for the next update for A1 - 810. I think this tablet can have 2 operating systems. We can be Android and second Windows. It can work because on Android, you need a minimum 2 hearts and on Windows also. And Tablet 4. So, it can work.

    And you will switch operating systems in the settings.

    I suggest you post it here:

    http://community.Acer.com/T5/Acer-ideas/IDB-p/Acer

  • How can I change password to get into my computer? I am now in my computer, but want to change for the next time I open it.

    How can I change password to get into my computer?  I am now in my computer, but want to change for the next time I open it.  Thank you.

    Click Start, click your account at the top right picture, click on 'change your password '. You must then enter the old password and a new.

  • To cancel, will I pay half the monthly price remaining (19.99 euros) for the next month half of the full annual price? [was: need to pay the whole price?]

    Hey!

    I come from Germany and I recently bought the subscription for students 'Alle Applications' type a year / compensation mohntly.

    And now, I've read that you can't cancel the membership without paying 50% of the remaining subscription price. What it means

    I need to pay half the monthly price remaining (19.99 euros) for the next month half of the full annual price?

    And now, I've read that you can't cancel the membership without paying 50% of the remaining subscription price. What it means

    I need to pay half the monthly price remaining (19.99 euros) for the next month half of the full annual price?

    Complete half of the annual fee.

    Your contract is 12 months, paid monthly, to cancel the contract of 12 months, you pay the tax for the half of the remaining contract obligation.

    for example if you cancel after 4 months, cancellation fees are 50% x 8 months.

  • Can we apply a createInsert single button for the two master form, details of Table?

    Mr President.

    Can we apply a createInsert single button for the two master form, details of Table?

    I want to just click a button and fields are available in form-Master and details-table.

    As below

    vfdt.png

    Concerning

    Mr President.

    My worm jdev is 12 c

    And I can do your job for you.

    His code

    For any organization that wants to do this job

     public void createVoucherAndVDetailsRow(){
                VoucherViewImpl voucherVO=this.getVoucherView1();
                VoucherViewRowImpl row=(VoucherViewRowImpl)voucherVO.createRow();
                voucherVO.insertRow(row);
                RowIterator iterator= row.getVoucherdetView();
                String voucherNumber=row.getVoucherId();
                NameValuePairs nvps=new NameValuePairs();
                nvps.setAttribute("VoucherId", voucherNumber);
                VoucherdetViewRowImpl voucherdetRow=(VoucherdetViewRowImpl)iterator.createAndInitRow(nvps);
                iterator.insertRow(voucherdetRow);
                }
    

    Concerning

  • The use of objects multi-state for the next stage of the course 9

    In my old clumsy e-Learning authoring tool, I could create a slide with several steps. You would click the button Next to display text and graphics.  When you get to the last step, the next step button disappears, so that you know that you have completed. How can I make this work with multi-state Cap 9 objects?  I created an object with 3 States multi-state. I created a button with an action go to Next State.  It is fine until you get to the last State.  If you click the button again, it starts again with the first State.

    Yes, I can create several buttons. But I really just want a button called next step which disappears after posting the last State.  The user would know that she had displayed all the steps.

    Any suggestions are welcome.  Thank you.

    Jeanne M

    Here is a sample script:

    This has been implemented for 6 States (for a container of text, the Normal State is an empty form).

    There are 2 user variables:

    • v_counter has a default value of 0
    • v_max is the number of States, you can replace it with the literal '6' or you need to

    The first decision "done" check if the counter reaches the maximum value (v_max). If this is the case all States should have been disclosed, and it should end the loop. That's why this decision will disable the button used to change States (SB_StateTrigger) and here also to change its status to an invisible state (AfterLoop). Upon return to the slide, the State will be back to Normal (visible), and simply activate the button again. You can replace this with a simple action to hide as well if you want.

    If the first decision is not true, there are still reports to be shown and the counter is incremented.

    All 6 other decisions are similar (I collapsed 2 of them): they will test the value of the counter and show the associated State. I used to state3 on a common standard. This makes it possible to use exactly the same advanced also action if the total number of States is less than 6. Simply change the value of v_max.

  • How to make a paper with some boxes to fill required for me to sign, and then some other boxes needed for the next person to sign. I want the boxes I've filled to be locked the next person.

    How to make a paper with some boxes to fill required for me to sign, and then some other boxes needed for the next person to sign. I want the boxes I've filled to be locked the next person.

    Hi johanb64152807,

    You can use eSign service, where you can send the document for signatures of several signatories, but the document will be sent to the following signatory after the earlier signed & it is not possible for him to make the changes.

    Documents KB for help: -.

    Kind regards
    Nicos

  • How can I update my credit card information to pay for the next tranche of creative cloud when it tells me that I have "Creative Cloud Free Membership" so without possibility to update a credit card - despite my payment for a slice of 1 year in January 20

    How can I update my credit card information to pay for the next tranche of creative cloud when the screen tells me that I have "Creative Cloud Free Membership" so without possibility to update a credit card - despite my payment for a slice of 1 year in January 2015?

    Hi kanikas100,

    Using my old Email to open a session allowed me to see my current subscription and I was able to update my credit card.   Thank you very much!

Maybe you are looking for

  • Questions about css vertical-align

    given a list of the CSA page: Technologies of Mac OS X I do not understand vertical-align.  I will like to center the text in the vertical alignment.  I don't know what basis means, or intermediate. Where Ref base?  background of the characters or wh

  • Satellite P100-324: memory of 512 MB discrete or shared graphics card?

    Hello I'll buy P100-324, but I couldn't be sure of its memory VGA cards. It says "GeForce Go 7900 GS 512 MB", I checked the map on the net and discovered that it was produced with a maximum of 256 MB of memory dedicated. Then 512 MB means X MB dedica

  • Build an installer

    Hey guys. My trial version of LabVIEW 2014 just ran and I can't build an installer for a .vi which includes the installation of data acquisition equipment so it can be run on any computer. The NOR cDAQ-9174 lets it read a digital signal which would g

  • language options in outlook express 6

    I have Outlook Express 6. I don't have a language option to check spelling, etc: French. I want English, Australian preference. Director of the MS Tech phone was told to go to support.microsoft.com/kb/826519. He looked confused for this little girl,

  • Open Paint maximized by the Publisher

    When you work with the editor, when I click a picture, it will open in paint (good) but reduced (boring). Sort to paint open enlarged Editor? I use Office 2007 and VISTA Home Premium. Thank you, David