Arrays, synchronous execution, plugin variables

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
guuzendesu
Posts: 62
Joined: 15 Jan 2014 08:25

Arrays, synchronous execution, plugin variables

Post by guuzendesu » 06 Feb 2014 01:03

So Joao Dias (maker of AutoVoice and others) has kind of challenged me with this:

"Hi again +dar thlaan . I tried Automagic a bit last night, and it seems really interesting. The flow part is really cool.
But the flipside is, it doesn't support plugins as well as Tasker. It doesn't show plugin variables, for starters. It also doesn't allow synchronous execution, which is when a plugin executes a task and Tasker waits for it to finish and return some results.
It also seemingly doesn't support arrays like Tasker, but maybe you could help me on that one. :) "

Now, I know there are different ways to do the same stuff (and I already said as much), but is there a better answer than that? And what about "showing plugin variables?" Is it possible?
Thanks for any input!

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Arrays, synchronous execution, plugin variables

Post by Martin » 07 Feb 2014 09:09

Hi,

The mentioned features are extension to the regular plugin protocol and have been added in the latest version of Tasker (version 4.2 I think). I was not in a hurry to add the extensions since many plugins available on Google Play probably won't support this yet. The new features are on my todo-list and should become available in one of the next versions of Automagic (I hope to add it in version 1.22).

Automagic supports real lists (the multiclipboard flow available in the flow sharing area makes heavy use of this).
The next version of Automagic will also wrap variables returned by a plugin ending with a number in a list. For example when a plugin returns var1, var2 and var3, Automagic will wrap it in a list called var.

Regards,
Martin

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: Arrays, synchronous execution, plugin variables

Post by ZSasha » 04 Mar 2014 02:50

Hi Martin,

just to confirm - as now (1.21) Automagic does NOT support a variable(s)returning from a plugin, is it correct?

I just installed AutoPebble plugin and it says "You'll get the %apconnected variable with the value '1' in Tasker if ... "

Is there any way of getting that variable or currently it is not possible?

Thanks.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Arrays, synchronous execution, plugin variables

Post by Martin » 04 Mar 2014 16:38

Hi,

AutoPebble seems to provide several plugins, the ones listed in the action plugin won't be able to return variables to Automagic since this plugin extension is not yet supported (should be supported in the next version).
Which plugin part are you using exactly? In an action, trigger or condition?

Regards,
Martin

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: Arrays, synchronous execution, plugin variables

Post by ZSasha » 04 Mar 2014 20:47

It Is "AutoPebble App" plugin -> "Check Pebble Connected" option. Should return 1 if Pebble connected.

thanks.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Arrays, synchronous execution, plugin variables

Post by Martin » 04 Mar 2014 21:31

This could potentially work with the newest EAP version of Automagic but this feature is mostly untested yet.
The plugin suggests that the action is executed synchronously which means that Automagic waits for a response for a defined duration (20s in this case, configurable) and provides the variables to the flow.

Post Reply