SHARE
TWEET

select word

a guest May 11th, 2019 146 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 beginCharsNum to (first item of theRange) + 1
  4.     set endCharsNum to beginCharsNum + 32
  5.     set textLength to count of characters of rich text of document 1
  6.     if endCharsNum > textLength then set endCharsNum to textLength
  7.     set second item of theRange to count of characters of first item of words of ((characters beginCharsNum thru endCharsNum) of rich text of document 1 as rich text)
  8.     theRange
  9.     set range of selection of document 1 to theRange
  10. 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