AquaMail Forum

English - Android => How do I... => Topic started by: Ramidalf on January 05, 2017, 04:56:40 pm

Title: How to work with AquaMail Arrays in Tasker
Post by: Ramidalf on January 05, 2017, 04:56:40 pm
I was able to use LatestEmail=%aqmsubject in Tasker which would return the latest title of the received email. The question is: how would i read several latest emails subjects by using arrays. Something like that ThirdEmail = %aqmsubject_array(3)?  I tried different ways but was not able to use arrays. It is worth to mention that I never used arrays in tasker before, I just started using Tasker yesterday. Appreciate your help.
Title: Re: How to work with AquaMail Arrays in Tasker
Post by: Kostya Vasilyev on January 06, 2017, 09:38:50 pm
Not a Tasker expert by any stretch of imagination (don't even use it myself), but:

http://www.pocketables.com/2012/10/beginners-guide-to-tasker-part-7-variable-arrays.html

???
Title: Re: How to work with AquaMail Arrays in Tasker
Post by: orzelpiotr on March 26, 2017, 11:48:17 pm
same problem -  %agmfrom_array variable dosn't give me any value
Title: Re: How to work with AquaMail Arrays in Tasker
Post by: Kostya Vasilyev on March 27, 2017, 12:45:21 am
I last tried it a few years ago, and remember the syntax (on the Tasker side) being quite "unexpected".
Title: Re: How to work with AquaMail Arrays in Tasker
Post by: orzelpiotr on March 27, 2017, 12:23:02 pm
ok, tell me then, is it working or not / I tried google play pro version and next one from https://www.aqua-mail.com/forum/index.php?topic=4820.0

In single variable everything is working great. is it hard to build option that gathers every newdata in each mail check to one line / separate with unique mark.

e.g. value = mailfrom1, mailfrom2, mailfrom3,

Then we could use Variable split and get all data in parts (tasker side) 
Title: Re: How to work with AquaMail Arrays in Tasker
Post by: Kostya Vasilyev on March 28, 2017, 01:12:35 am
Hm, so single vars are working for you?

Maybe something's changed on Tasker side? I haven't touched this code in a couple of years probably.

The code puts "single" variables into return data like this:

bundle.putString("%aqmfrom", "lala@foobar.com")

and arrays like this:

final ArrayList<String> list = ...
bundle.putStringArrayList("%aqmfrom_array", list)

The dev guide

http://tasker.dinglisch.net/plugins.html

still says:

ArrayList (from v4.3) values are also supported

---

If you enable Aqua Mail's debug logging (please see my signature below), then you should see output from Aqua Mail like this:

EventQueryReceiver varsBundle <a trace of variables that AquaMail returns to Tasker>