This simple script (edit: I fixed the code, the original got truncated by careless copy/pasting)
(() => {
const app = Application("DEVONthink 3");
const URL = 'https://bru6.de/jxa/';
const URLsource = app.downloadMarkupFrom(URL);
})()
sends Script Editor into Lala land. Not every time, but reliably if the debug tabs are open.
It runs ok from osascript
, though.
Am I doing something stupid or is it just Script Editor that misbehaves?
I just got this on Ventura…
Right. The function is not executed, because the ()
are missing at the end.
After those are fixed it gives this error:
That’s weird – there is nothing called choices
nor obj
in that code:
(() => {
const app = Application("DEVONthink 3");
const URL = 'https://bru6.de/jxa/';
const URLsource = app.downloadMarkupFrom(URL);
})()
Sorry - I was confusing it with another script posted today:
It looks like it’s stalling on some NSRegularExpression stuff. @cgrunenberg would know more than me on it.
Just sent me the sample (although at least DEVONthink’s code doesn’t use regex in this case).
The process sample has things with osascript
and JXA
but unrelated to DEVONthink.