• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
7

Need Script to collect all misspelled words

Explorer ,
Dec 12, 2023 Dec 12, 2023

Copy link to clipboard

Copied

Hi team,

I am working is Medical based text jobs in english where I have so many medical words which not usually present in User dictionary. so it will shown as dynamic spell error. 

To rectify this I whould like to collect all dynamic spell error words later I will add all in dictionary.


I tried the below script, its not working

// InDesign ExtendScript to collect misspelled words

// Access the active document
var doc = app.activeDocument;

// Check if there are any misspelled words
if (doc.spellingErrors.length > 0) {
var misspelledWords = [];

// Iterate through each misspelled word
for (var i = 0; i < doc.spellingErrors.length; i++) {
var error = doc.spellingErrors[i];
var misspelledWord = error.contents;

// Add the misspelled word to the array
misspelledWords.push(misspelledWord);
}

// Output the collected misspelled words
alert("Misspelled Words: \n" + misspelledWords.join(", "));
} else {
alert("No misspelled words found in the document.");
}


Please give some idea to achive the task.

Regards

Nousheeth

TOPICS
How to , Import and export , Scripting

Views

126

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2023 Dec 12, 2023

Copy link to clipboard

Copied

Rookie responding, so please be kind if this is totaly incorrect 🙂
Might this line:
misspelledWords.push(misspelledWord);
need to be modified as
misspelledWords.push($misspelledWord);
to insert the word as a text string?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2023 Dec 12, 2023

Copy link to clipboard

Copied

The document object doesn't have the property spellingErrors. Is it maybe part of a scriptable plug-in that you installed? Did you write the script yourself?

 

P.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 13, 2023 Dec 13, 2023

Copy link to clipboard

Copied

HI Peter kahrel,

I got this from a facebook community friend but its not working, and I'm Unable to reach them back.

kindly letme know if any other option to achive my task

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 12, 2023 Dec 12, 2023

Copy link to clipboard

Copied

This may not address any of your needs or interests, but be aware that one spell-checking 'language' is USA Medical. (There's also a USA Legal.)


╟ Word & InDesign to Kindle & EPUB: a Guide to Pro Results (Amazon) ╢

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 13, 2023 Dec 13, 2023

Copy link to clipboard

Copied

LATEST

@Nousheeth -- Did you see James's comment about the US medical word list?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines