Skip to main content
Inspiring
February 4, 2013
Answered

How do I Alert UIColors.red

  • February 4, 2013
  • 1 reply
  • 1310 views

Hi Forum,

How do i get Alert if the document misspelled texts has UIColors.red as underline.... after setting the spellPreferences....

with(app.spellPreferences){

    checkMisspelledWords = true;                    // Find, Misspelled Words

    checkRepeatedWords = true;                        // Find, Repeated Words

    checkCapitalizedWords = true;                    // Find, Uncapitalized Words

    checkCapitalizedSentences = true;                // Find, Uncapitalized Sentences

    dynamicSpellCheck = true;                        // Enable Dynamic Spelling

    misspelledWordColor = UIColors.red;                // Color, Misspelled Words

    repeatedWordColor = UIColors.green;                // Color, Repeated Words

    uncapitalizedWordColor = UIColors.green;    // Color, Uncapitalized Words

    uncapitalizedSentenceColor = UIColors.green;    // Color, Uncapitalized Sentences

}

thanks in advance.

rajnikids.

This topic has been closed for replies.
Correct answer Jongware

rajnikids wrote:

if (ConditionUnderlineIndicatorAppearance.WAVY ==UIColors.red) {

      alert ("document has misspelled words")

}

You cannot compare an Appearance enumerated value with a UIColors enumerated value. The actual 'value' of the constant ConditionUnderlineIndicatorAppearance.WAVY is 1937208953, the one of UIColors.RED is 1767007588 (values directly taken from http://jongware.mit.edu/idcs6js/pe_ConditionUnderlineIndicatorAppearance.html and http://jongware.mit.edu/idcs6js/pe_UIColors.html). Under no normal circumstances ought these values be the same.

In addition, you are testing "if apples are sad then the sky is rich" to check for mis-spelled words:

1. Conditions themselves have nothing to do with mis-spelled words.

2. The way conditions are shown on screen -- wavy, dashed, or solid -- have nothing to do with mis-spelled words.

3. The interface color "Red" has nothing to do with mis-spelled words.

You seem to be assuming there is a relation. The fact that both conditions and mis-spelled words may be marked on screen by a red, wavy underline means nothing at all.

The only way I can think of "spell checking via script" is to use a live preflight check, and parse the results of that.

1 reply

rajnikidsAuthor
Inspiring
February 4, 2013

Hi forum,
This is what i need to find...
I got a clue to find red wavy underline, but something wrong in my script...
can anyone help me..

if (ConditionUnderlineIndicatorAppearance.WAVY ==UIColors.red) {

      alert ("document has misspelled words")

}

The result is "true" in ESTK...  BUT NO ALERT IS PRODUCED in indesign...

Legend
February 4, 2013

Hello,

The wavy lines a drawn dynamically. I don't know if you can do a search for miss spelled words.

P.

rajnikidsAuthor
Inspiring
February 4, 2013

Thanks Pickory,

Can i find alteast & alert using UIColor.red.. if possible.

thanks for your reply...