フィールドに入力した数字に自動的にコンマを入れる

on mouseUp
  get me
  repeat with x = the number of chars in it down to 1
    put char x of it before tNumber -- adds the current number at the front
    put char x of it before tTemp
    if the number of chars in tTemp mod 3 = 0
    then put comma before tNumber -- adds a comma every 3 places
  end repeat
  if char 1 of tNumber = comma then delete char 1 of tNumber
  put tNumber into me
end mouseUp

 

※上記スクリプトを、フィールドに書く。
※ 一行目のget meで、フィールドに入力した内容を取得、itに渡す。
※最初にRunRevに質問した時の返事です。たぶん完璧なスクリプトです。
※その後も色々質問していたら、テクニカルサポートはコンサルティングなので今後は有料、と言われてしまいました。で、ディスカッション・ログの検索方法を教えてもらいました