The Satimage OSAX too has ‘uppercase’ and ‘lowercase’ functions:
uppercase "hello" --> "HELLO"
lowercase "HELLO" --> "hello"
. and a ‘change’ function which might be usable for capitalising initials, but I haven’t looked into it.
Presumably, the solutions in this thread make the orignal enquiry redundant. But, as posed, it would require a record of records rather than a list of them. This would have to be either written out in longhand or constructed so:
set caps to {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
set letters to {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
set letter to "{"
repeat with meow from 1 to (count letters)
set letter to letter & (item meow of letters) & ":{|lowercase|:\"" & (item meow of letters) & "\", |uppercase|:\"" & (item meow of caps) & "\"},"
end repeat
set letter to (run script (text 1 thru -2 of letter) & "}")
--> {a:{|lowercase|:"a", |uppercase|:"A"}, b:{|lowercase|:"b", |uppercase|:"B"}, c:{|lowercase|:"c", |uppercase|:"C"}, d:{|lowercase|:"d", |uppercase|:"D"}, e:{|lowercase|:"e", |uppercase|:"E"}, f:{|lowercase|:"f", |uppercase|:"F"}, g:{|lowercase|:"g", |uppercase|:"G"}, h:{|lowercase|:"h", |uppercase|:"H"}, i:{|lowercase|:"i", |uppercase|:"I"}, j:{|lowercase|:"j", |uppercase|:"J"}, k:{|lowercase|:"k", |uppercase|:"K"}, l:{|lowercase|:"l", |uppercase|:"L"}, m:{|lowercase|:"m", |uppercase|:"M"}, n:{|lowercase|:"n", |uppercase|:"N"}, o:{|lowercase|:"o", |uppercase|:"O"}, p:{|lowercase|:"p", |uppercase|:"P"}, q:{|lowercase|:"q", |uppercase|:"Q"}, r:{|lowercase|:"r", |uppercase|:"R"}, s:{|lowercase|:"s", |uppercase|:"S"}, t:{|lowercase|:"t", |uppercase|:"T"}, u:{|lowercase|:"u", |uppercase|:"U"}, v:{|lowercase|:"v", |uppercase|:"V"}, w:{|lowercase|:"w", |uppercase|:"W"}, x:{|lowercase|:"x", |uppercase|:"X"}, y:{|lowercase|:"y", |uppercase|:"Y"}, z:{|lowercase|:"z", |uppercase|:"Z"}}
return |lowercase| of g of letter
--> "g"
I’ve used bars in the ‘|uppercase|’ and ‘|lowercase|’ labels because I have the Satimage OSAX installed. If you don’t have it installed, the bars won’t appear in the ‘return’ line when you compile the script or in the constructed record when you run it.