script capNStuff
set x to current application's NSApp's convertedValue()
set x to x's componentsSeparatedByString_(":")
set x to x's componentsJoinedByString_("")
set x to x's uppercaseString()
end script
script lowNStuff
set x to current application's NSApp's convertedValue()
set x to x's componentsSeparatedByString_(":")
set x to x's componentsJoinedByString_("")
set x to x's lowercaseString()
end script
if mode is "upper" then
if txt contains "ß" then
(*
Required to convert ß if we don’t want to get SS *)
set oTIDs to AppleScript's text item delimiters
set AppleScript's text item delimiters to "ß"
set l to text items of txt
set AppleScript's text item delimiters to character id 7838
set txt to "" & l
set AppleScript's text item delimiters to oTIDs
end if
tell application "ASObjC Runner" to set txt to (run the script {capNStuff} converting txt with result returned)
else if mode is "lower" then
tell application "ASObjC Runner" to set txt to (run the script {lowNStuff} converting txt with result returned)
end if