Automating things with JS - Questions about tools and techniques

Hi,
Dabbling with JS in various places (Keyboard Maestro, Scriptable widgets, Drafts, Omnigraffle, and more), I feel like I am missing a point:

  • I have a fair understanding of the syntax and programming concepts (classes, variables, functions, data structures, loops, etc…) which is enough to get me going.
  • But it feels like I am struggling on how to discover the interfaces that a program would expose (classes, methods,… ) which is even more key to the automation
    I mean, some of the documentations are helpful but it still feel very cumbersome to context-switch all the time to check which methods I can call in a script based on what I am doing.
    For example, recently playing with Scriptable Widget for IOS14, it took me quite some time to get something going just because I was having some issues understanding which parameters I could call, which type of entity I was referring to in my code and I am sure it could be much smoother.

–> Do you have some tools or methods that help you with some of the areas listing above? Like some IDE suited for Javascript in a MacOS/IOS automation context (ie: making scripts rather than full projects)? Maybe there is some obscure equivalence between AppleScript and Javascript where I could use an app dictionary to move around?
Really any helpful suggestion about tools, techniques, places to learn more about the workflow rather thanJS itself would be super welcome!

Thanks a lot!

1 Like

Note: Some of us are talking about fixing this for Drafts with some wiki material.

(I wouldn’t want to widen this to other environments you can write JavaScript for. Though that’s an intriguing idea. The Drafts. Ocean is big enough to boil…) :slight_smile: