I'd like to know if there's a faster way of copying a range of text from a TextEdit document without having to use so many system events to find, cmd+shift+down and copy the range of text (for cases from word -> end of document).
Thank you in advance.
This answer might be too simplistic for what you're looking for but it should at least get you started in the right direction.
set yourText to "This is some test text that you might want to work with."
set i to offset of "test" in yourText
set finalText to characters i thru -1 of yourText as string
As a side note, I see many people doing things within applications like TextEdit when they don't really need to. In other words, if you're just trying to get the content, there is no reason to open the file in TextEdit (or similar) and script that, you can just read the text file into a variable and then work with your content.
As an example, your script could look something like this...
on run
set yourText to read file "Macintosh SSD:Users:myuser:Desktop:myTextFile.txt"
set i to offset of "test" in yourText
set finalText to characters i thru -1 of yourText as string
end run