Reversed name appears in the index under 'Symbol' rather than 'A', 'B', 'C '...

Hello

I wrote a simple script that quickly adds a reference section and page (first level) to an index. It seemed to work OK, then I am ambitious and tried to write another script, this time one that reverses the order of a first name and family name where there is a space between them. But now, even if the name is duly reversed, it appears in the Index panel under 'symbol' rather than the first letter of the family name.

I would be very grateful for any help.

Thank you, Jeremy

myDocument var = app.activeDocument;

myIndex = myDocument.indexes.item var (0);

var myMarker = app.selection [0];

var myText = myMarker.contents;

myDialog = app.dialogs.add var ({name: "Add entry index with the range at the end of the Document", canCancel:true});})

{with (MyDialog)}

{with (dialogColumns.add ())}

var myTextEditField = textEditboxes.add ({minWidth, editContents:myText:200});})

}

}

Ditto var = myDialog.show ();

if(myResult == true) {}

var myIndexTerm = myTextEditField.editContents;

myDialog.destroy ();

var myBreak = myIndexTerm.indexOf(' ');

var mySurName = myIndexTerm.slice (myBreak);

myFirstName var = myIndexTerm.slice (0, myBreak);

var myReversedName = mySurName + ', ' + myFirstName;

var myTopic = myIndex.topics.add (myReversedName);

myTopic.pageReferences.add (myMarker, PageReferenceType.TO_END_OF_DOCUMENT);

myTopic.name = myReversedName;

}

Jeremy,

The contents of your myReversedName variable begins with a space: the problem is in this line:

> var mySurName = myIndexTerm.slice (myBreak);

He grabs the space between the first and last name. So, because your topic name starts with a space, it is placed in the section of symbol. Apparently, ID has a mechanism to correct this and removes the space when you click on the element. Instead, use this:

> var mySurName = myIndexTerm.slice(myBreak+1);

In addition, you can use GREP JavaScript to change the name and first name:

> myReversedName = myIndexTerm.replace (/ ([^] +) (. +) /, "$2, $1");

Peter

Tags: InDesign

Similar Questions

  • My family name is not the same thing as my husband, but my name appears on the emails under his name. How to change that?

    My name is different from my husband: for example, my name is Mary Smith and my husband is John Doe. When I send an email, the message watch is from may Doe. How can I show that it is Mary Smith? If I send a message to myself, I've send it to Mary Smith, but it is the same thing.

    This is why it is so difficult to solve a problem in the Internet especially in any detail.

    When you look at the main window you see the pane of folders on the left side of the window with your e-mail accounts listed?
    If this is not the case, press the alt key to make the call of menu bar, then select View-presentation-folder pane.

    Now follow the original instructions.

    All this assumes that you and your husband have separate accounts. If you share the same account, then forget. There is only one name associated with an e-mail account. Then the answer is get a second account in your name.

  • I want my name appears on the emails to the recipients.

    I don't want my last name appears in the box 'from' to those to whom I send e-mails, I want my name displayed only (as well as my e-mail address).  I made this change in Outlook 2007, but the recipients always tell me that my last name also appears.  What can I do to change this?

    The name that appears on your outgoing mail comes from the your name: field under user information in the account settings.  I guess where you changed it.

    Send an e-mail message and examine the header to see what is there.

    If your address is someone's addressbook, e-mail that person program could show your full name even if it is not in the message that is sent to you.

  • Why one of the pages of the site appears as the index in my reports?

    Why one of the pages of the site appears as the index in my reports?

    Screen Shot 2014-08-25 at 8.22.32 AM.png

    Hi morganagordon,

    Please share the URL of your site.

    Also, check the Page properties of the pages of your file of Muse for the name of the page, page title and the name of the pages.

    To verify the same, you will need to open the file with Muse, switch to the view of the Plan, which is located on every page of thumbnails, select "Page Properties" and select the Options tab.

    Concerning

    Sonam

  • Connected devices no longer appear in the Finder under Devices window

    Hi guys,.

    When I plug the external drives that they no longer appear in the Finder under Devices window. They appear on the desktop. See screenshot.

    How is it and how do I het their re = appear?

    Thank you very much

    Raphael

    Hi there, rshammaa.

    It seems that your MacBook Pro with OS X 10.11.5 is not recognizing your external hard drives. I'll be happy to help you!

    OS X El Capitan: preferences Finder -since the drive icons appear on your screen, uncheck and then recheck all your "peripheral" in the tab of the sidebar in your Finder preferences.

    Thank you for using communities of Apple Support and have a great day!

  • My HP DVD/ROM does not appear in the device under my computer Manager or when I scan for readers.

    My HP DVD/ROM does not appear in the device under my computer Manager or when I scan for readers, most of the time.  Every now and then it will be visible and I can use it but 90% of the time it does not exist.  I tried the regedit fix, nothing.  I tried the program Microsoft Fix It, it tells me it cannot locate a DVD/ROM.  I removed, cleaned and reinserted my DVD/ROM drive, but no difference.  I tried everything, except the upgrade to Windows 7... who will be my last resort.

    Hello gargoyle28m,

    If your hardware is not detected to upgrade to Windows 7 is not a resolution. This issue may be caused if the DVD drive is faulty or connections loose on the mother board. You may need to check the connections. I suggest you check if the DVD drive works on another computer. You can contact the manufacturer of your computer to help you with this problem.

    Thank you
    Irfan H, Engineer Support Microsoft Answers. Visit our Microsoft answers feedback Forum and let us know what you think.

  • Topics don't appears in the index

    I use RH10, HTML version to generate PDFS.  I have patients who use a white font on a dark background:

    Topic PDF page.jpg

    When I generate the Index, the topics using the white font not displayed.  However, the subjects who use black font appear:

    PDF Index.jpg

    The index entries are structured using the section properties:

    Topic properties.jpg

    How can I get the subjects using white font appears in the Index?

    In fact just by selecting the index would confirm the theory. The text would show against the selection color.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • From LR6.1 to LR6.3: rename folders created are based on the date of importation rather than the date of shooting!

    I started using LR with version 2... My import workflow was even up to 6.1 and all my files are organized in the same way for more than 10 years.

    I went on LR6.2 given the changes made in the import dialog. But upgraded to LR6.3 think the problem has been resolved.

    But now I noticed that all my photos are renamed and placed in folders corresponding to the date of importation rather than the date of shooting... I rename my files from custom and is gone in this dialogue, but has not as how to restore LR import my photos using the date of shooting. This creates havoc on my hard drives and in LR. I use the date of shooting a lot to find my photos, since I often neglect to add keywords.

    I really need to be able to get the date of shooting on the behalf of my photos and have copied them in the folder the correct date.

    Thanks in advance for your help.

    BTW: something has changed in the way the forum appears. Research is not very powerful... it has not brought something, yet I know that the import dialog has been at length when 6.2 was introduced. In addition, I see no browser passed a few more recent messages. I don't like the new interface.

    Well, I answered my own question. Yes, I was looking for settings in the destination Panel... There is a line that shows what would change the name... and it showed the date of importation as the new name... but actually... It was only to show you what the name change would look like. Because I had a selected image, I thought it would show that the change of name for this image. But it is not related to the image... The import worked as expected... My apologies for disturbing him. .

  • UNKNOWN NAMES APPEARING IN THE SECTION 'SHARING' TOPIC @ WINDOW LEFT

    I STARTED SEEING NAMES APPEARING UNDER THE HEADING IN THE LEFT COLUMN IN ANY WINDOW, I OPENED "SHARED." I HAVE A MAC MINI (END OF 2012), ROUTER NETGEAR, APPLE TV, BURNING AND A HP PRINTER 3 IN 1, USED FOR SCANNING. THE LAST THREE ITEMS ARE CONNECTED WIRELESSLY WITH THE ROUTER.

    THE NAMES THAT APPEAR ARE:

    EXPENDIA-PC

    SECCHA-PC

    TIBERRIUS-PC

    I CAN'T FIND ANYWHERE THAT I CAN BLOCK OR DELETE THESE UNKNOWN ELEMENTS. THEY HAVE A MAC ADDRESS AND AN IP ADDRESS... BUT I COULD NOT FIND INFORMATION USEFUL YET. WHEN I CLICK ON THE NAMES, EACH OF THEM OPENS ANOTHER WINDOW, SAYS 'WINDOWS PC' WITH COMPUTER ART.

    ALL SAY NOT 'CONNECTED', BUT I'M A LITTLE PARANOID ON THE QUESTION OF WHETHER SOMEONE COULD TRY TO HACK INTO MY COMPUTER.

    I know... I'M DENSE INTERNET OR HACKING THE NETWORK. ALL MY FRIENDS HAVE COMPUTERS SO THAT THEY WERE NOT MUCH HELP WITH THIS.

    ANY HELP WOULD BE APPRECIATED.

    Have you tried to go to Finder > Preferences > sidebar and uncheck Bonjoir computers?

  • How to display your name URL without the index.html file

    Hi, I publish my site using Adobe Muse on a host computer in Godaddy. But when I type my name url it shows a bunch of directories, but when I type my urlname/index.html then appears then the content of my Web site. I want to be able to just type in my url name www.urlname.com and have my site highlight. Please let me how can know I go about it.

    Please see the similar discussion here:

    https://forums.Adobe.com/message/5612296#5612296

    Thank you

    Sanjit

  • For subdirectory names appears in the address bar

    Hi all! I will do this as short and sweet as possible. Our org is part of a University, and our Web site is running on the server of the University. HOWEVER, our domain is registered through Yahoo to give us more flexibility and independence. Of course, our domain name "www.potomacacademy.org/" is what appears in the browser address bar, when someone goes to our home/index page. For some reason, any specific page, we visit, is the title to the address bar never changes, it's to never say no 'subdirectory' folder/file name. Yahoo customer service site shows only how to change it IF we use their package webhost (which we don't). So, is it possible for me to change that on my end, in the local or remote site (University server)? Thanks for your ideas - and minor exclamations, if any.

    I wouldn't say that the site was built around frames. The main url for the site is hosted at:

    http://www.gmu.edu/Depts/music/Potomac/index.html

    Frameset is probably the only page hosted for the other domain. This was done as an easy way to host another domain name. They could consider using a subdomain and redirect of www.potomacacademy.org to the subdomain. Or use a url rewriting.

    Or they might simply move the files from the site to the host potomacadacemy.org.

  • How can I get the tabs group names appear above the tabs?

    At some point the names of all of my tab groups appeared above the tabs. In other words, there is a horizontal list of open tabs on each page. Above that there was a similar list of horizontal search all groups tabs. This horizontal list of tab groups is now missing.
    This has been useful to reorganize and re-classification of the tabs into different groups because I could see the entire page for any given tab and could move the tab to another tab group simply by clicking on the tab and dragging to any group in the section tab above the tabs section groups. It's usually easier than reorganization of the tabs on the tab page groups (accessed by clicking on "Your group tabs" icon top right of the screen).
    I don't know how this feature got there or why he went, but I liked it.
    How can I get that back?

    I agree. It is a very impressive device available through an add-on that is no longer supported. It would be really useful for me tab groups.

  • App without a name appears in the settings but not on the screen of the ipad

    I had problem with wifi dying on me due to unforeseen circumstances recently. Tonight, while checking on ipad, I found this afeter by pressing "set" if I scroll this page on the left there is the lift of the applications installed on the iPad. The first application I have on it is not a name but if had authorized access to the location, mobile data and so on

    I want to get rid of this unknown app but since it does not appear on the screen of my ipad, I can't kill it.e!

    Help please! Fear that this could be the virus any.

    This is the logo of the app...

  • under vista and cannot detect cam sex. Webcam appears in the device under usb Manager, but under imaging devices and sound happens with one! and said that the drivers are not installed.

    When I try to install the drivers under sound and also imaging devices he returned with access denied and the code 28 error and said that the drivers for this device are not installed.

    Hello cal26,

    Have you tried to visit the website of your computer manufacturer to see if a driver/software update is available for your computer? Hope this helps you. Let us know anyway. Make it a great day!

    "And in the end the love you take, is equal to The Love You Make" (The Beatles last song from their latest album, Abbey Road.)

  • Update of today seems to have changed the interface for the bar of icons rather than a list search engine. Is there a way I can restore?

    I know everyone says that they 'hate' changes to the familiar interfaces in a first time before getting used to them, but I just personally don't like the look of the icon-tray in everything I use (it seems to overcome at least some of the usefulness of the Internet on a computer rather than on a mobile phone). I also kind of a lot of up there, search engines that not everything I can recognize immediately by icon. I know it's a minor inconvenience, but having to scroll on an icon to see the name of its search engine is quite annoying after being used to having a nice list that comes to tell you their names. Some way I can change it back to the old interface of the list?

    Open Subject: config (typed in the address bar) and turn this false preference

    browser.search.showOneOffButtons

    Then restart Firefox.

Maybe you are looking for

  • HP Pavilion dv7: reset password bios HP Pavilion dv7 help

    Need help, enter the bios. Admin lock code is 77267208 Thanks in advance for your help. Much appreciated!

  • No sound... Droid Maxx

    The sound of my Droid Maxx is. No sound ringtone that no notification no sound no media noise. the music and video. This problem is my phone virtually useless. I need help to solve this problem. I tried what I can but not yet resolved. I used factory

  • PIXMA Pro - 100 and Windows 8.1 help please...

    Hello I'll try to be concise Spent the whole day on the phone to do this without the same answer twice * sigh *. I was told and I read again and again that YES, Pro-100 WILL absolutely work with Windows 8.1. Then... It is possible that it will NOT wo

  • HP 3050 has - J611a > > head scanner stop scanning continues.

    Hello The printer is new and has been installed correctly by following the instructions from HP, and all functions work correctly, printing and scanning on WI - FI, high quality printing and scanning quality. It is used on an i3 with 4 GB of ram and

  • XP Media Ctr ' 05-03 student Office - make a Pic of 2 x 2 of. JPEG?

    I have an old Photo Shop Elements 2.0 that I would prefer not not re-install just to Mod a photo JPEG/do a pic of 2 x 2 for a credit card. I don't have 03 Office Visio as a result of Google allowing to do, I'm so good that I have to spend $15 or re-i