a guest May 12th, 2019 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- tell application "CotEditor"
- set theRange to range of selection of document 1
- set beginCharNum to (first item of theRange) + 1
- set endCharNum to beginCharNum + 32
- set textLength to count of characters of rich text of document 1
- if endCharNum > textLength then set endCharNum to textLength
- set second item of theRange to count of characters of first item of words of ((characters beginCharNum thru endCharNum) of rich text of document 1 as rich text)
- set range of selection of document 1 to theRange
- end tell
RAW Paste Data