アスキーナンバーで文字を指定したり逆にアスキーナンバーを調べます。
set myChar to ASCII character (34) set myNum to ASCII number "A" --ちなみに改行はreturnでタブはtabです。下記はクリップボードを操作します。コピーした文字列を取り出したり、クリップボードにテキストを入れて、ペーストすることができます。
set the clipboard to "123"--クリップボードに文字列を入れる set myTable to the clipboard--クリップボードから文字列を取り出す下記はSORTです。早くありませんが、リストを並べ替えます。
on SORT(myList)
set myCount to count items of myList
repeat
set myFLG to false
repeat with N from 1 to myCount - 1
set buf1 to item N of myList
set buf2 to item (N + 1) of myList
if buf1 < buf2 then
set item N of myList to buf2
set item (N + 1) of myList to buf1
set myFLG to true
end if
end repeat
if myFLG is false then
exit repeat
end if
end repeat
return myList
end SORT