List of names

As a scripter no (I can change the existing scripts) I need help with this question: I'm looking for a javascript that allows me to add one or more titles (e.g., Defence Minister, Finance Minister) to a particular style of Pará (Minister + 30mm) at the cursor insertion point.

What I need: a list of titles (I thought about 15 titles but t can be more or less) to select from (one or more) and this list should be placed at the cursor insertion point but in the order it was selected. It may be at this title 3 comes before Heading1 (issue of importance).

We run on win7 with CC. Note: the script must be run twice, once on the Dutch side and the side once French.

thnakx for any suggestion, Gert

Hello

I suggest using "palette" type of window and listBox instead of dropDownList (with scroll bar).

In a code below doubleClick is to insert text and "remove the last" button deletes the last line in the text box.

The "Finish" button closes a palette window

#target indesign
#targetengine mDialog
var
  mTitles = ["TitleOne","TitleTwo","Title3","Title4","Title5","Title6","Title7","Title8", "Title9"],
  w = new Window ("palette","Title multiselector", undefined);

w.alignChildren = "left";
w.add("staticText", undefined, "Doubleclick to choose and add. \r'Delete' button removes last added", {align:"left",multiline: true,closeButton: false});

var
  body = w.add("group"),
  mList = body.add("listbox",undefined,mTitles,{scrollbar: true}),
  mButt = body.add("group");
  mButt.orientation = "column";
  mButt.alignment = "bottom";
  mButt.add("button", undefined, "Delete last");
  mButt.add("button", undefined, "Finish");

  mList.preferredSize = [200,150];

  mList.onDoubleClick = function() {
     app.selection[0].contents = mList.selection.text + "\r";
     }
  mButt.children[1].onClick = function() {
     w.close();
     }
  mButt.children[0].onClick = function() {
     app.selection[0].parentStory.lines[-1].remove();
     }
  if (app.selection[0].constructor.name == "InsertionPoint") w.show();
  else {
     alert("Make a cursor active inside desired text box");  exit();
     }

dropDownList could be used however choose element is easier in the listBox, in my opinion.

Jarek

Tags: InDesign

Similar Questions

  • How can I copy the list of names of files in the finder and set the Clipboard filenames separated by commas?

    Hi guys, I was wonder if anyone can give me a hand with a script.

    I need to be able to paste a list of file names of the files as follows:

    0001.jpg 0002.jpg 0003.jpg 0004.jpg

    At the moment, if I select the files in the Finder, copy to the Clipboard and paste them in TextEdit, they are like this:

    0001.jpg

    0002.jpg

    0003.jpg

    0004.jpg

    I found a similar but slightly different script and I don't know how to change it. Here it is:

    Define extension_list to {"jpg", "" JPG","jpeg","JPEG"}

    the value cbNames (Clipboard text) paragraphs

    Set csvNames to {}

    the tid value delimiters to point to the text of the AppleScript

    the text value of the AppleScript point delimiters ".»

    -now, make a list of names without extensions

    Repeat with the names in cbNames

    If the point 2 of the text names is extension_list then

    copy of text 1 of names at the end of csvNames

    end if

    end repeat

    Journal csvNames

    -now the filenames as comma CONCATENATE string separated

    the text value of the point delimiters AppleScript «»

    csvNames value cross-as text

    the text value of the point AppleScript delimiters tid

    There is an easier way. Open a TextEdit document and paste the list in. Place the cursor at the end of the first item and drag it to the start of the second.

    Press on + command + c to copy and then command + f to bring up find it. Press command + v (do not click in the first search field). Check the 'Replace' box, click in the field replace, and then type a comma and a space.

    Click 'All' and then 'done '.

  • When I click on address book I no longer get the slot to insert a name, instead a long list of names/addresses

    I sent this way new emails (not responses): click on address book. Place comes the space to insert a name. I do, find the name (among some close to it), select it and then click on "write". The result is an email address, which I proceed to write and send. But since there is one day, when I click on the address book, what appears is a long list of names and email addresses. It fills most of the screen of the iMac. And there is no space to insert a name.
    Without doubt, I did something stupid to get there. What have I done? And how I turn the tide?
    Thank you.
    Arthur

    This isn't answering your question on what is wrong.

    I think that the address book is a pretty lame place to start.

    Click on write or reply or forward and window of writing messages appears. pre-populated with the text of the previous message if it is a reply or forward.

    If you select the To: box and start typing, it will feature names in the address book corresponding to what you typed.

    If you really prefer to choose from a list, you can open a Contacts Sidebar which lists one of your address books. There are buttons to add Contacts selected to your message. You can drag and drop and use right click too. On a PC, F9 opens this sidebar, or you can use alt + v to get the view menu and choose the Contacts Sidebar in the submenu. I don't know how much it works on Mac.

    It is so easy to add multiple addresses. You can set them as Cc or BCC.

    Your method allows you to send a new message, but does not support the answer or transfer. It penetrates into all recipients regarding: and you have to change one by one, if that is not appropriate.

    You see why I think that the address book is a bad place to start from?

    If this alternative approach does not work then I suggest that corrupted address book. You have a recent backup to restore from?

  • Clean the list of names

    Hello

    When I want to assign a name to a face, pictures offer a list of names, some of them are obsolete (they are missing the names of my contacts, and no face is affected).
    How can I clean the list?

    Thank you

    How can I clean the list?

    You can't clean up the list.  The list of the names of the faces is stored in the photo library.

    You will get an empty face names list, if start you with a photo library empty, but it would be a bit drastic.

  • When you send an Email to someone not in my contact list "Check names" appears and says not in the contacts list, and are not sent.

    original title: sending Emails

    When you send an Email to someone not in my contact list "Check names" appears and says not in the contacts list, and are not sent.

    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    • Recent changes to your computer
    • What you have already tried to solve the problem

    If you use a POP3 Protocol account, please post on the forum network, e-mail and put online:

    http://social.answers.Microsoft.com/forums/en-us/vistanetworking/threads

    If you use Hotmail, please report it to Windows Live Solution Center, son of Hotmail:
    http://www.windowslivehelp.com/forums.aspx?ProductID=1 . for the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • List of names by sticking in a Multipage PDF control

    Hello

    I am a graphic designer in a University and create page 40 InDesign documents that are basically a certificate by page I can easily paste a list of names in. I'm trying to shift the responsibility to add the name of the student and printing of certificates to certain members of staff who do not InDesign, but use instead Acrobat.

    How can I set up a 40-page PDF model that has a field name of student on each page, but with different domain names so that each name is unique who gets entry. Also, is it possible to paste a list of names circulating in the 40 pages, as it does in InDesign or a method to fill the 40 pages with names without entering them one at a time?

    For the first part to get the 40 PDF document page, I'm better export a document from InDesign 40 pages in PDF format and then manually adjusting all fields if necessary or can I create 40 pages in Acrobat based on a model of a page. How can I create 40 pages on the same model of a page and create unique domain names in Acrobat?

    Thank you

    Mike

    OK, here's how you can set up the document.

    Page 1: A page with a single button and the unique multi-line text field. I'll assume a name text field of the "names".

    Page 2. A page that is the certificate with a text field for the name. This page should be turned into a model and then hide the model. I'll take a 'certificate' model name and a name of text field 'name '.

    For the button on page 1, the mouse upward script could be:

    Script mouse upwards to button field

    A list of the names of text field

    var sNames = getField("names").valueAsString;

    Split string to transport returns in an array of names of

    aNames var = sNames.split ("\r");

    Get a reference to the model

    model var = getTemplate ("certificate");

    Object to store model xObject

    oXO var;

    Loop in the table...

    for (var i = 0; i)< anames.length;="" i="" +="1)">

    .. .and reproduce the model name is not empty

    If (aNames [i]) {}

    Set the value of the name field on the hidden template

    getField("name").value = aNames [i];

    If {(oXO)

    Template.Spawn ({nPage: numPages, bRename: true, bOverlay: false, oXObject: oXO});

    } else {}

    oXO = template.spawn ({nPage: numPages, bRename: true, bOverlay: false});

    }

    }

    }

    It's really the script intended to demonstrate the basic principles, minimum. It could be improved in a number of ways, but it should help you get started. Post again if you get stuck. If you don't know how to do a page of a model and hide it, let us know which version of Acrobat you are using - the specific steps are different depending on the version.

  • InDesign - prevent breaks between the first and last names in a very long list of names?

    Is there a quick way to do?  Having the list 800 names in a text box and want to prevent the first & last names being split at the end of the line.  Other than choosing each name and apply the rule "no break" (a lot of time).  Any other suggestions?

    This is a more elegant solution:

    (?<=[\l\u]) (?="">

    Apply style: no pause

    It detects all single space between two letters

  • Listting the name of the files in a directory of files

    Hello

    anyone knows how I can list the names of the files in a directory of files that had my Datasouce file configured?

    Should I include in my package ODI existence returns a list of files in the directotry a short walk

    Ex.: I got a data server 'FILE_CCRS./arquivos_odi/ccrs/in' which directory is "/ arquivos_odi/CTC/in" and the need to
    a list of the names of files are in this directory, some as a result od the comand DIR (see below):

    arq1.txt
    ARQ2.txt
    arq3.txt
    ...

    I need to create something like a variable refress with the above values (name of the afiles)

    Hello
    Use OdiOscCommand or even create the script with below codes file
    ls /home/your_user_name_or_any_source_path/*.txt > /home/your_user_name_or_any_destination_path/filenames.txt

    Code above will create the file.txt file that maintains the list of file name (only the text due to mask file).

    Now you must read filename a file.txt and use this in your variable.

    For windows, you can get the command down the link and the logic to process all the file in the following link.

    http://odiexperts.com/getting-one-or-several-unknown-files-from-a-directory/
    http://odiexperts.com/multiple-files-single-interface/

    Thank you.

  • How to display a list of names by category

    I am creating a Setup for a web site of Airshow where volunteers can apply online and specify their favorite activity. The airport manager will then assign volunteers to an activity and we would like a list of people devoted to each activity, per day - as aerospace will run for 3 days. There are about 10 activities.

    I know I could create about 30 recordsets (10 for each day) and then you view the list of names for each activity in a table, but it seems to me that there should be a more elegant way. I think that I could create 3 sets of records, one for each day and then view a list sorted by name of volunteer activity. Basically, I would like to have something that looks like this for each day:

    Activity 1

    -Name 1

    -Name 2

    -appoint the 3

    Activity 2

    -name 4

    -quote 5

    Activity 3

    -name 6

    etc.

    I use DW CS4 with PHP/MySQL.

    Thanks a lot for any assistance before you begin creating recordsets from 30.

    <>
    initialize a variable to store a history of activities
    $previous = ' ';

    {? >}
              <>
    If ($row_rsVolunteersFriday ['assignedactivity']! = $previous)
    {echo "'." "} $row_rsVolunteersFriday ["assignedactivity"]. »
    ";
    echo $row_rsVolunteersFriday ["firstname"]. » ";
    echo $row_rsVolunteersFriday ["lastname"]. »
    ";
    keep the current name in the variable $previous
    $previous = $row_rsVolunteersFriday ["assignedactivity"];
    }

    on the other
    {echo $row_rsVolunteersFriday ["firstname"]. » ";
    echo $row_rsVolunteersFriday ["lastname"]. »
    ";
    }
    ?>

  • List full names and class IDS

    Is there a complete list of all the built-in class IDs with their names in programming?

    I looked at the help page of the ID LV2012 class property located here: http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/gen_class_id/, but it's incomplete. For example, the RadioButtonsControl has a 72 ID and is not listed.

    Or better yet, is there a screw there that can convert an ID U32 value in the corresponding class name?

    Try this.

  • List of names of logged in user

    Hello

    I want a list of all the usernames connected. I tried to use the "name of the query" command using the Exec.vi system but got the error: 'query' is not recognized as internal or external, command an executable program or batch file.

    Is there another way to get a list of the logged in user names?

    Thank you

    Ritesh

    It is in your Windows/System32 directory and this directory is off-limits to non-administrative programs for safety.

    Copy it into another unprotected file, and then use the full path in the copy utility:

    cmd /c 'C:\NewDir\query.exe' user

  • Media Player 11 payne repeatedly list lists the name of the file instead of file name

    Hello:

    I am using media player 11 to play .wav files.  The payne list shows only the name of the folder repeatedly (album name) instead of the list the file names (song).  How can I configure this to display file names?

    Hello

    · Will there be any changes on the settings on windows media player before the show?

    I suggest you to change the sorting option on the reading list and check the results. You can check the link below for more information: create and use your own customized reading lists: http://windows.microsoft.com/en-US/windows-xp/help/windows-media-player/11/playlists

    You can also try the steps from the link below: Add or edit media information: http://windows.microsoft.com/en-US/windows-xp/help/windows-media-player/11/album-info

  • Is it possible to paste a list of names of files in a word doc. I do not want the complete files, just their names.

    I want to stick a list of files that I have in my documents in a word file.  I don't want all of the files, just a list of their names.  Is it possible to copy and paste or another way in which I can do this without having to type in by hand.

    Unfortuately, no. I use this tool on Vista and Windows 7 with no problems. Try the support forum. In addition, there is a send to x powertoy that was part of the original Microsoft powertoys. You can grab a copy of this here (w95powertoy) If you want to take a look. Microsoft® Security MVP, 2004-2009

  • How to delete list of name for the computer images tags

    How can I remove the list of the names of tags for the photos to the computer. Cannot remove the

    It is possible that the change of name the Windows Photo Gallery
    database file could accomplish the task.

    (depending on your version of Windows Photo Gallery
    the database could be Pictures.pd4 or pd5 pd6.)

    C:\Users\[username]\AppData\Local\Microsoft\
    Windows Photo Gallery\Pictures.pd4 or pd5 pd6

    The database is a file... you will need to
    Change the following setting:

    Reach... Control Panel / folder Options / View tab.
    ... To check "Show the hidden files and folders" / apply / OK.

    The file ends with a advanced
    Search for pd4 pd5 and pd6.

    Reach... Start / Search / Advanced search.

    Check the box... "include not indexed, hidden and"
    system files' Enter pd4 pd5 or pd6 in the name field

    Try to rename the file .pd4, pd5 or pd6 to Pictures.OLD

    The next time that the Gallery is launched, it will create
    a new database file and the gallery will appear as
    He did the first time you have ever opened.

    The gallery must fill in again and some tags
    and metadata can be lost.

    If you are not satisfied with the results... you can delete
    the new database file. If you rename the original back
    Pictures.pd4, pd5 pd6 your gallery should be like
    It was before the change.

    Good luck...

  • How can I get my Contacts to the list the name and email address?

    I want to copy my list of Contacts, emails.  But Contacts shows only the name.  How to make it so that it displays the name and email, that it was, I can copy my list?

    Hi Joanne Ivy Stankievich,.

    Can I know which e-mail client are you using?

    If you use Hotmail.

    I suggest you contact windowslivehelp.

    http://Windows.Microsoft.com/en-us/Windows-Vista/import-export-or-change-the-format-for-contacts

    http://Windows.Microsoft.com/en-us/Windows-Vista/managing-your-contacts

  • How to remove the Windows account Journal in the drop-down list of names which are wrong

    My Windows in the drop-down list log has several wrong names that I would like to delete. These were errors of spelling or in a case not hittiing the tab before you ertering my password.

    When you click the start planet, then help, then search for help on "User account", then you will find complete guides on any topic related to user accounts.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-security/how-to-delete-user-IDs-on-drop-down-menus-from-for/571140c5-2332-4dc7-ba68-e55e14e5ac13

Maybe you are looking for