Whoops, sorry I forgot to mention that I did this as well.
I'm aware the font features only uppercase letters so included the below line of code as well, but still only the first character is changed.
doc.activeLayer.textItem.capitalization = TextCase.ALLCAPS;
doc.activeLayer.textItem.font = "GoodMorning";
Now problem is that capitalization = TextCase.ALLCAPS does not really change the case of letters - it changes only the style of their display (essentially it an effect that draws over the text, like any other function from the characters palette
). TextItem.contents string does not change.
To really change case of letters, you need to change the case in textItem.contents using .toUpperCase
activeDocument.activeLayer.textItem.contents = activeDocument.activeLayer.textItem.contents.toUpperCase()
activeDocument.activeLayer.textItem.font = "GoodMorning"

activeDocument.activeLayer.textItem.capitalization = TextCase.ALLCAPS
activeDocument.activeLayer.textItem.font = "GoodMorning"

activeDocument.activeLayer.textItem.capitalization = TextCase.ALLCAPS
activeDocument.activeLayer.textItem.font = "GoodMorning"
alert (activeDocument.activeLayer.textItem.contents)
