Why this unfunction script?

Hello world

can you find the wrong syntax for this script and help me to fix it?


app.findGrepPreferences = app.changeGrepPreferences = null;
var doc = app.activeDocument,
_selection = app.selection [0] .words;

var ignoreWords = "one, a, and, the, to, with, in, on, title or, to, in, by, their, then, for, are, which is, be"


app.findGrepPreferences.appliedParagraphStyle = '01 H1;

find = app.selection [0] .findGrep ();

for (var i = 0; i < finds.length; i ++) {}

If (ignoreWords.IndexOf (_selection [i]. (Happy) == - 1).
{
finds [i] .texts [0]. ChangeCase (ChangecaseMode.titlecase);
}
}

app.findGrepPreferences = app.changeGrepPreferences = null;

John

Hi John,.

".name" should be added at line 8 with appliedParagraphStyle. Change line 8 Jarek script as below.

if(_selection[i].appliedParagraphStyle.name == "01 H1" && ignoreWords.indexOf(_selection[i].contents) == -1) 

Kind regards

Cognet

Tags: InDesign

Similar Questions

  • Why this simple script script does not work

    I'm pretty new to actionscript, I have learned from books, in fact I still am.

    The script that I'll try to work on my site, worked well in the teachings of the books.

    I don't think that my buttons are different, but why don't they work then.

    Can someone figure this.

    my script:

    Stop();

    whoweare.addEventListener (MouseEvent.MOUSE_UP, onNavigate);

    function onNavigate (evt:MouseEvent): Void {}
    gotoAndPlay ("contact");
    }

    whatwedo.addEventListener (MouseEvent.MOUSE_UP, onNavigate);

    function onNavigate (evt:MouseEvent): Void {}
    gotoAndPlay ("slideshow");
    }

    Error: the class or interface 'MouseEvent' could not be loaded.

    Help?

    Dirkhou,

    void not Void in AS3

  • Why this scriipt does not work with Firefox? &lt; embed src = "News2008Fall.pdf" width = '615' height = '3200' &gt; &lt; / embed &gt; "

    Please tell me why this script does not work with Firefox. It works with Safari. Here is the page that includes the script: www.lionsgatehoa.org/newslettertest.html. Thank you. Tom Engleman

    Here's the script in my html document:

    < embed src = "News2008Fall.pdf" width = '615' height = '3200' > < / embed > "

    Edit: removed # phone

    Works for me on Linux.

    Your system details list does not display the Adobe Reader plugin, so you'll have to (re) install this program.

    See:

  • What is the problem with this resolveNodes script?

    I have the code on a checkbox to the mouseup event:

    Outline is the following:

    Form1

    mainForm

    Subform

    checkBox1

    I intend to have several subforms more.

    This is the script:

    If (this.rawValue == 1 | xfa.resolveNodes("mainForm.subForm[*]").checkBox1.rawValue == 1)

    xfa.resolveNodes("form1.mainForm.subForm[*]").border.fill.color.value = "180,180,180";

    on the other

    xfa.resolveNodes("form1.mainForm.subForm[*]").border.fill.color.value = "255,255,255";

    When I click on this box should turn to the gray background of mainForm.  Instead, it does nothing.  Anyone has an idea why this script does not work?

    Thanks for any help!

    The resolveNodes method returns more than one object. If you want to set a field value in an instance, then you must use the resolveNode method.

    But when you resolveNode method, you must pass the index of the subform. You cannot pass [*]...

    Probably from your hierarchy, your code should look like this...

    var i = this.parent.index;

    If (this.rawValue == 1 | xfa.resolveNode("mainForm.subForm["+_intIndex_+"]").checkBox1.rawValue == 1)

    xfa.resolveNode("form1.mainForm.subForm["+_intIndex_+"]").border.fill.color.value = "180,180,180";

    on the other

    xfa.resolveNode("form1.mainForm.subForm["+_intIndex_+"]").border.fill.color.value = "255,255,255";

    Thank you

    Srini

  • Why the tableStyle script not working, when the other two are

    Hi, please can you help and thank you in advance. I'm puzzled. As you can see, I am new to scripting - a glance through the 15 pages on the forum showed me how the news - and I want a workflow in which I put the styles and then use in this case, "appliedTableStyle" to connect to the appropriate table.
    My question is why this style of table script not work and appear in the palette? (when the two scripts below paragraphs and cells are) I tried the doc.tableStyles.add and the doc.tableStyle.add. Please show me where I'm wrong, or a better alternative. Thank you.
    docTest = app.documents.add)
    table_styles (docTest)
    cell_styles (docTest)
    para_styles (docTest)
    function table_styles (doc)
    {
    with (doc)
    {
    //try {doc.tableStyles.add
    try {doc.tableStyle.add
    ({
    name: "tableGLOBAL."
    bodyRegionCellStyle: doc.cellStyles.item ('cellGLOBAL'),
    headerRegionSameAsBodyRegion: true,
    bodyRowCount: 10.
    headerRowCount: 1.
    })
    }
    catch {} (_)
    }
    }
    function cell_styles (doc)
    {
    with (doc)
    {
    try {doc.cellStyles.add
    ({
    name: "cellGLOBAL."
    appliedParagraphStyle: doc.paragraphStyles.item ('paraBodyGLOBAL'),
    topInset: 0,
    leftInset: 0,
    bottomInset: 0,
    rightInset: 0,
    verticalJustification: VerticalJustification.CENTER_ALIGN,
    firstBaselineOffset: FirstBaseline.LEADING_OFFSET,.
      })
    }
      catch (_){}
    }
    }
    function para_styles (doc)
    {
    with (doc)
    {
    try {doc.paragraphStyles.add
    ({
    name: "paraBodyGLOBAL."
    appliedFont: "Arial,"
    firstLineIndent: 0,
    justification: Justification.LEFT_JUSTIFIED,.
    pointSize: "6 pt."
    main: '8 '.
    })
    }
    catch {} (_)
    }
    }

    Your trial... construction of capture hides the real error - during the development of a script, you can not use.

    When I removed it, ID has reported only with the message quite without value

    "Error string: this attribute is not defined for the table styles.

    Source: ts = doc.tableStyles.add({")

    without saying what attribute... Try one by one, I found this particular result: you cannot initialize 'headerRegionSameAsBodyRegion '... Probably because you cannot initialize without a header first, and you don't "do" again because you always initialize the entire style.

    But this workaround works:

    ts = doc.tableStyles.add({
     name: 'tableGLOBAL'
     , bodyRegionCellStyle: doc.cellStyles.item( 'cellGLOBAL' )
     , headerRowCount: 1
     , bodyRowCount: 10
    });
    ts.headerRegionSameAsBodyRegion = true;
    
  • After the installation of Sierra, websites follow me like crazy!  This has not happened before.  Why this is happening and what can I do to stop it?

    After the installation of Sierra, Web sites started to follow me like crazy!  This has not happened before.  Why this is happening and what can I do to stop it?

    What are your privacy settings in Safari preferences.

  • My Airport Express will randomly start flashing orange and I have to unplug it to make it back to the green.  Wifi continues to operate even when the light is orange flashing.  Anyone know why this is happening?

    My Airport Express will randomly start flashing orange and I have to unplug it to make it back to the green. Wifi continues to operate even when the light is orange flashing. Anyone know why this is happening?

    The next time you see the flashing light amber...

    Open Finder > Applications > utilities > AirPort Utility

    Click on the image of the AirPort Express

    If you see a button update, click on update the firmware on the airport

    Otherwise, find status and click on the little orange dot it. A message will appear to say why the airport complained and suggest a remedy for the issue.

  • Why this message: you are not allowed to view or update this topic

    Why this message: you are not allowed to publish or comment on it.

    It's a legitimate question.

    You encounter a bug in the Jive Software that runs this forum. Most of the time simply try again or refresh the page will fix the problem. There is one caveat with respect to time. You can't post more than once every 30 seconds, and it's to discourage spamming.

  • don't get open email addresses do not message, then possibly the email opens; Why this took place over the 2 or 3 days?

    During 2-3 days when I try to open an e-mail or delete an email I get "not responding" after 30 seconds or so him "unresponsive" goes then and I can open the e-mail or delete it. Why this is happening now and how can I fix it? It is very annoying to have to wait to read or delete an e-mail. I compact the file whenever the message appears on my screen.

    https://wiki.Mozilla.org/Thunderbird: test: Antivirus_Related_Performance_Issues #McAfee

  • Why firefox free version 29.0.1. It's terrible! I had to find a plugin to change the back legs. Bad decision. Why this was done?

    Why firefox free version 29.0.1. It's terrible! I had to find a plugin to change the back legs. Bad decision. Why this was done?
    Not happy with the version 29.0.1 - are there plans for this move?

    Hi RickAce

    Could you please start a new thread for your question?

    You can provide more information such as your operating system and installed extensions and plugins installed.

    In case of accidents also please add a few recent crash ID that you can find on the subject: page hangs and which begin with a prefix 'bp '.

    You can check for problems with the files that store the preferences.

    Delete a possible user.js file and files numbered prefs-# .js and rename (or delete) the file prefs.js to reset all the prefs by default, including the prefs set via user.js and pref which is no longer supported in the current version of Firefox.

  • My firefox always frozen for a long time and this last show this message "Script: chrome://browser/content/browser.js:9933"How can I remedy. "

    I use 8 pro window, after installation of the 23.0.1 my browser started to freeze and atime after a long time promot with this message "Script: chrome://browser/content/browser.js:9933" with an option to stop script or continue, whatever one I choose that it always freezes over and over again.

    In order to be able to find the right solution to your problem, we need a few more non-personal on your part do the information as follows:

    • Click on the Firefox button in the top left, then click on the help menu and select troubleshooting information in the submenu. If you do not have a Firefox button, click Help on the top menu and select troubleshooting information in the menu.

    Now, should open a new tab containing your troubleshooting information.

    • At the top of the page, you should see a button that says "copy the text to the Clipboard. Until it clicks.
    • Now, go back to your post on the forum and click inside the box to answer. Press Ctrl + V to paste all of the information that you copied in the post on the forum.

    If you would like more information on the troubleshooting information page, please read the article, use the troubleshooting information to help solve the problems of Firefox.

    Thank you in advance for your help!

  • I can't see the images received by using my Yahoo email in my MacBook Air, but I can see them in my iPhone 6, no idea why this is happening?

    I can't see the images received by using my Yahoo email in my MacBook Air, but I can see them in my iPhone 6, no idea why this is happening?

    Hello

    If you access your Yahoo mail via Mac Mail application, in the Mail menu bar, click Mail > Preferences , and then select the display tab to assure you that:

    Display remote messages HTML images is selected.

  • I just upgraded my Firefox to version 9.0.1, I get multi-page opening now when I launch my browser. A page is my home page, another is welcome to Firefox, and the other is my LassPass. Can anyone tell my why this is happening?

    A page is my home page, another is welcome to Firefox, and the other is my LassPass. Can anyone tell my why this is happening?

    Create a new profile as a test to see if your profile is the source of the problems.

    See "basic troubleshooting: a new profile:

    There may be extensions and plugins installed by default in a new profile, so check that in "tools > Modules > Extensions & Plugins" in case there are still problems.

    If this new profile works then you can transfer files from the old profile to the new profile, but make sure not to copy corrupted files.

    See:

  • Why this page has missing elements in FFox 8.0 (running Lion 10.7)

    Why this page displays not the .png missing on the bottom.

    Looks fine in all other browsers

    http://www.jordieshapiro.com/home.html

    It seems to me. It's maybe just you need to clear your cache-> hold down the SHIFT key and click on reload. If it does not try to clear your cookies and cache - cache and delete cookies

  • Unable to run email of announcement of Craigslist with Firefox web browser. The link works fine when you use Internet Explorer. Don't know why this problem?

    When I click on send to a Craigslist of announcements of sale, e-mail software does not run. When I used the same craigslist Web page with Internet Explorer, the e-mail program runs without any problem. Not sure why this problem?

    If you change your preference of mail helper in Firefox for 'other use '.... "you are presented with a command prompt to select an application click 'Browse... '. "and browse your computer for the program of choice. Even if you're already shown two e-mail programs, try to re - select the one you want to use via the method go and then try again to open a mailto link.

    If this does not work, open your profile button in folder

         Help > Troubleshooting Information
    

    and the release of Firefox. With Firefox closed, remove the file "mimeTypes.rdf" of your profile folder, and then restart Firefox and Firefox will re - build the helper, file applications and you can try again to send someone from a link.

Maybe you are looking for

  • iPhone not syncing with itunes

    Hello I have a problem with my iPhone 6 do not sync with iTunes. I tried many fixes nothing works. When connecting my iPhone to my laptop via the USB port, it will load. But iTunes won't recognize the device. I got around this before creating a separ

  • Pavilion Notebook LK8JHHPQ: Factory reset

    HP told me that I have to do a reset to factory my laptop HP Pavilion LK8JHHPQ. I've never done before. Could someone provide instructions for such an operation? If I am not mistaken not all applications and programs provided with the system will be

  • Portege 3500 - keyboard problem

    HelloI'm having a problem very similar to the one described here: http://forums.tabletpctalk.com/viewtopic.php?t=507&highlight=keyboard My keyboard does not work, even if the alt and shift keys work to password login screen. On the screen, the light

  • Adding pieces to an existing selection

    I'm new to this so here is my second question on this forum. Anyone know how to add a song to an existing selection made by windows media player. I tried once and lost everything in the playlist - went straight to the clip - no was more here, I had t

  • The update of bridge CC (2015) breaks the command "Reveal in Bridge" InDesign

    We have several Macs and PC running creative cloud. To date on OSX / Win10.The bridge was last updated break the revelation at the head of bridge InDesign, which is an integral part of our workflow.Instead he throws to the creative cloud app - sugges