Can someone please help me get around this problem...
I am adding a caption direction ("Front cover: ") before an existing caption in a labelled text frame.
The script works fine except in cases where the last word or two of the caption has an italic character style applied (for a scientific name). After the script runs, the resulting caption has more italicised characters than the original. It seems to depend on the number of characters originally styled (eg. if the last 12 characters of the original are italic, then the last 24 of the revised caption will have the character style applied).
snippet of concern is:
set dsCoverCap to contents of text frame "CoverCap"
set dsCoverCap to "Front cover: " & dsCoverCap
set contents of text frame "CoverCap" to dsCoverCap
I guess my approach to adding the caption direction is wrong. But I can't work out another way to do it.