Hi francois marais, I've created a sample SL file as per your requirements. Add an execute javascript trigger in SL as per your requirement (timeline starts/ends or when user clicks).
Code for ALL CAPS:
var player = GetPlayer();
var newVar = player.GetVar("TextEntry");
newVar = newVar.toUpperCase();
player.SetVar("TextEntry", newVar);
Code for Initial Caps:
function capitalizeFirstLetter(string) {
return string.replace(/\b\w/g, function(l){ return l.toUpperCase(); });
}
var player = GetPlayer();
var newVar = player.GetVar("TextEntry");
newVar = capitalizeFirstLetter(newVar);
player.SetVar("TextEntry", newVar);
Let me know ff you need any further help!