Try using the ASCII commands in the Standard Additions dictionary.
example:
Code:
set file_name to "blah-BLAH-blah-234"
set new_file_name to convertToCaps(file_name)
log new_file_name
on convertToCaps(x)
set z to {}
repeat with a in (characters of x)
set b to ASCII number a
if b > 96 and b < 123 then
set b to b - 32
set end of z to (ASCII character b) as text
else
set end of z to a as text
end if
end repeat
return z as string
end convertToCaps
returns
(*BLAH-BLAH-BLAH-234*)
There's probably a more efficient method. Visit
MacScripter.net to see if there's anything better.
Happy Applescripting!
Here's a list of results using the ASCII number command:
"a"--> 97 "A"--> 65
"b"--> 98 "B"--> 66
"c"--> 99 "C"--> 67
"d"--> 100 "D"--> 68
"e"--> 101 "E"--> 69
"f"--> 102 "F"--> 70
"g"--> 103 "G"--> 71
"h"--> 104 "H"--> 72
"i"--> 105 "I"--> 73
"j"--> 106 "J"--> 74
"k"--> 107 "K"--> 75
"l"--> 108 "L"--> 76
"m"--> 109 "M"--> 77
"n"--> 110 "N"--> 78
"o"--> 111 "O"--> 79
"p"--> 112 "P"--> 80
"q"--> 113 "Q"--> 81
"r"--> 114 "R"--> 82
"s"--> 115 "S"--> 83
"t"--> 116 "T"--> 84
"u"--> 117 "U"--> 85
"v"--> 118 "V"--> 86
"w"--> 119 "W"--> 87
"x"--> 120 "X"--> 88
"y"--> 121 "Y"--> 89
"z"--> 122 "Z"--> 90
[This message has been edited by lycaon (edited 06-03-2000).]