First step: get the folder that contains the current project:
Or, to make it generic:
Then comes the part that splits up the target segments in words and writes all words to:
projectDirectory/resources/spellchecker/user.dic
Like this:
I will have to add handling of URLs and e-mail addresses ...
alwayslockyourbike
Currently working on a macro to add all words in a segment to the project's user.dic