Page 1 of 1

Automagic scripting language question

Posted: 12 Mar 2013 15:45
by fractals
Hi everyone,

First of all, thanks to the Developer for creating such a great tool! I've been using Tasker for more than 4 years now but decided to try Automagic because it integrates nicely with the brilliant Gleeo time tracker. In the meantime, I've decided to stick with Automagic since it looks at least as powerful as Tasker plus it has the added benefit (and fun factor) of creating flows in a visual way. And on top of that, scripting and variables are a hidden gem and I intend to explore that further.

This brings me to my question. I'd like to know if the scripting used by Automagic is a "pure" implementation of a language (java, javascript, bash script, python or something else) or, in case it's a slightly modified version, what is the "established" scripting language that Automagic has most similarities with (if any)? And what would they be?

Thanks in advance for your answers! :)

Re: Automagic scripting language question

Posted: 14 Mar 2013 09:04
by Martin
The little scripting language used in Automagic looks a bit like java/javascript but was originally only designed to allow simple expressions like "a=3", "b=1+a", logical expressions like "a AND b" and stuff like that. Later we added some features like function calls, if/for/while-expressions (syntax mostly inspired by java).
We also got the inspiration for some of the features from other languages (like ruby if-expression instead of the java ternary operator, javafx/ruby expressions in string literals like a="value is {1+2}" etc.).

Re: Automagic scripting language question

Posted: 01 Jul 2019 00:14
by Pepy
Since you've taken ideas from so many different languages, I'm curious as to what language you think would be best to use if editing scripts and expressions via another editor?

I know some people choose to use JavaScript but I was wondering if there is an even better choice than that. Also, when saving these files, I give them a ".script" extension, though I'm sure it shouldn't matter what you call it as long as you can open it without the "code" inside getting corrupted.

Re: Automagic scripting language question

Posted: 06 Jul 2019 19:55
by Martin
I'm not sure if there's really another language that matches the Automagic scripting language well. I would probably configure an external editor to just highlight the keywords and handle comments in the form /* comment */ and // comment.
Most better text editors should be capable of handling this. You can get the list of keywords from the Script help page: Script.