I’m having some frustration with what should be a simple script. All I want to do is select all of the text of the line the cursor’s on (unless it’s selected already) and send the (cleaned up) text in that via URL to another app.
It seems to me the editor object (to select the line) is unavailable in Actions and the app object (to open the URL) is unavailable in Key Scripts. Am I wrong? Is there another way?
This is just one simple example, but having two vastly different scripting contexts is very confusing and limiting.
Note: I am trying this in Drafts 4, I want to see if I can migrate from Editorial to Drafts 5 before I invest in it. Was this a bug, or an improvement in v5 that wasn’t mentioned anywhere?
That was Drafts 5 script. It wouldn’t work with that script on Drafts 4 as it is a rather substantial update to Drafts 5 and you can find many resources online that will guide you through the differences. I’d recommend checking out @agiletortoise’s own Drafts web site getdrafts.com and, whlst it is some months out of date and many things have in fact moved on, @nahumck’s extensive review on Macstories.
I still have Editorial and style use it for bits and pieces, but Drafts 5 is under active development and is incredibly flexible. It is very much my daily driver for working with text outside of my work.
In my opinion, comparing Editorial to Drafts 4 is a false experience in terms of evaluating “Drafts”. Drafts 5 is the here and now. It is free to download, and you can get Pro feature access for just a month for a couple of pounds. My recommendation would be to grab the app, take a month of Pro and try it out that way. Afterwards you would still have Drafts 5 (which can coexist with Drafts 4 by the way) and could still take advantage of a great number of the features without being on the Pro subscription … but with it, you can bend Drafts to your will in so many ways
You can only operate on the editor (text selections, etc.) with key scripts in Drafts 4, which do not have access to non-editor functions. Drafts 5 merged keys into actions so they have all the same capabilities and one consistent scripting interface.
Drafts 4 has only very basic scripting capabilities in either case. Opening URLs from script is not supported, for example.