Page 1 of 1

Macro to Insert Screenplay Character

Posted: 2023-01-16 00:07:20
by loulesko
This macro creates a list from a paragraph style so the text can be inserted again. The use case is when writing in screenplay format. Some clever people will undoubtedly think of other ways to use this macro. My profound thanks to @phspaelti for guidance on the core aspects of this macro.
Screen Shot 2023-01-16 at 12.04.04 AM.png
Screen Shot 2023-01-16 at 12.04.04 AM.png (199.55 KiB) Viewed 1880 times
Insert Character.nwm.zip
(2.54 KiB) Downloaded 205 times

Re: Macro to Insert Screenplay Character

Posted: 2023-01-17 13:34:32
by martin
Thanks for sharing your macro Lou. I like the way it uses the existing document content as a sort of database to pull out character names. That's a nice trick! I'll have to keep it in mind since I'm sure it's adaptable to other situations.

Re: Macro to Insert Screenplay Character

Posted: 2023-01-17 15:25:59
by loulesko
Thanks Martin. The only caveat I found—which I think is specific to this situation—the paragraph style is set to Uppercase which is display only in Nisus. Which means (as you know) if a name is typed uppercase or lowercase it will always display uppercase. But .containsValue is case sensitive so I was getting multiple entries of the same name if they were in different cases.

The macro converts the found array item to uppercase before saving to the new array for display in the Prompt Choice window. With everything the same case I can search if the next found item is in the display array so I don't duplicate it.