tell application "Adobe Illustrator"
tell document 1
set selectedItems to selection
if selectedItems is {} then
display dialog "text frameを選択ツールで選択してください。"
return
end if
repeat with selItem in selectedItems
if class of selItem is text frame then
set Cnum to count characters of selItem
repeat with N from 1 to Cnum - 1
set TXT1 to contents of character N of selItem
set TXT2 to contents of character (N + 1) of selItem
if TXT1 is in "0123456789,." and TXT2 is in "0123456789,." then
set alternate glyphs of character N of selItem¬
to half width --等幅半角字形
set alternate glyphs of character (N + 1) of selItem¬
to half width --等幅半角字形
end if
end repeat
end if
end repeat
end tell
end tell
コメントする