SHARE
TWEET

Select word

a guest May 12th, 2019 122 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. tell application "CotEditor"
  2.     set theRange to range of selection of document 1
  3.     set beginCharNum to (first item of theRange) + 1
  4.     set endCharNum to beginCharNum + 32
  5.     set textLength to count of characters of rich text of document 1
  6.     if endCharNum > textLength then set endCharNum to textLength
  7.     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)
  8.     set range of selection of document 1 to theRange
  9. end tell
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top