Are you sure Textastic supports AppleScript? If so, I’m pretty sure each app has its own AppleScript dictionary, and while some common terms are found across many apps, there may be difference in usage. You might try to find some examples of AppleScript scripts for Textastic on the web and see if you can adapt your existing code to reflect those.
I thought that is what it means, but it looks like there are some examples of scripting it out there, at least to a limited extent. See below. I was also able to write a simple AppleScript to work (just telling it to open) in Script Editor, so maybe you can get somewhere.
No need to apologize, my mistake if I sounded impatient. I just meant that it might be possible, and I didn’t have time to try more specific approaches.