[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(DTPtechNote:718) Re: try文の中の文字化け
なんばさんのご助力をもちまして、無事に解決。
要するに、as unicode textしとけ、と。
property scale_rate : 100 --拡大/縮小率(%)
property direction_way : "ヨコ方向へ" --貼り込み方向
property interval_space : 20 --貼り込み間隔
tell application "Finder"
activate
with timeout of 3600 seconds
repeat
set ANS_1 to display dialog "現在の設定は..." & return & "拡大/縮小率(%):" & scale_rate & return & "画像配置方法 :" & place_way default answer scale_rate buttons {"キャンセル", "スタック", "タイル"} default button place_way with icon 1
set ANS_2 to display dialog "貼り込み間隔は..." default answer interval_space with icon 1
try
set place_way to button returned of ANS_1
set scale_rate to (text returned of ANS_1) as number
if scale_rate < 0.1 or scale_rate > 19999 then error --拡大/縮小率の制限
set interval_space to (text returned of ANS_2) as number
exit repeat
on error errMsg number errNum
set errMsg to errMsg as Unicode text
set aa to display dialog ("文字化け解消! やた〜" as Unicode text) & return & errMsg & return & errNum --★★★
end try
end repeat
end timeout
end tell