Trigger actions X hours before calendar entries - a more elegant way?

1,851 views
Skip to first unread message

Alex

unread,
Mar 5, 2015, 3:57:31 PM3/5/15
to tas...@googlegroups.com
I've been trying to find an elegant method to get Tasker to trigger based on calendar entries which are going to happen in the future, not which are active right now.

I want Tasker to fire off two tasks, one task ten hours before the calendar entry, and the other task two hours before the calendar entry.

I haven't been able to use State -> App -> Calendar Entry successfully. I suspect this is because this function tests for whether a calendar entry is currently active, not whether it will be active soon.

Then I spotted that Tasker can respond to notifications. So I set a reminder in my calendar for ten hours ahead of time, and created a Tasker profile with a start time matching the calendar reminder, a duration of eight hours, and an entry and exit task. Then I added the notification event to the profile, and the exit task changed to an entry task, so both sets of tasks fired at the same time, rather than eight hours apart.

Eventually, after lots of trial and error, I got this to work:

* Add two reminders to the calendar entry, one set for 10 hours, the other set for 2 hours.
* Create a profile with a 2-minute time window around the 10-hour reminder, set to respond to the Notification event. Configure this profile to execute the first ask.
* Create another profile with a 2-minute time window around the 2-hour reminder, set to respond to the Notification event. Configure this profile to execute the second task.

The above two steps appear to do what I want, but I don't think they're very elegant. Is there a better way to get Tasker to fire off two (or multiple) tasks in advance of a calendar entry which isn't yet active?

At the moment the schedules for the calendar entries are regular and repeatable, so I don't have to create too many Profiles to monitor them all. However, if I could work out a template which could be applied generically to any calendar entry, that would be really useful.


--
Alex

Rich D

unread,
Mar 5, 2015, 4:17:05 PM3/5/15
to Tasker Google Groups Post


> I want Tasker to fire off two tasks, one task ten hours before the calendar entry, and the other task two hours before the calendar entry.

Did you try a search of this group.  This has been asked and answered several times and one user took the time to post a working task to get calendar events from the future. 

jbtastic

unread,
Mar 5, 2015, 5:59:45 PM3/5/15
to tas...@googlegroups.com

Alex

unread,
Mar 6, 2015, 3:09:53 AM3/6/15
to tas...@googlegroups.com


On Thursday, 5 March 2015 21:17:05 UTC, Rich D wrote:


> I want Tasker to fire off two tasks, one task ten hours before the calendar entry, and the other task two hours before the calendar entry.

Did you try a search of this group.


Yes.

However, I wasn't aware that I needed to search for "sqlite", which is revealed in jbtastic's helpful reply.

Alex

unread,
Mar 6, 2015, 3:10:35 AM3/6/15
to tas...@googlegroups.com
On Thursday, 5 March 2015 22:59:45 UTC, jbtastic wrote:
Thank you. That's very helpful, and gives me a useful starting point to learn sqlite.
 

Rich D

unread,
Mar 6, 2015, 5:20:59 AM3/6/15
to Tasker Google Groups Post

> Thank you. That's very helpful, and gives me a useful starting point to learn sqlite.
>  

There is also a more complex approach just using tasker actions on here as well. 

jbtastic

unread,
Mar 6, 2015, 12:21:22 PM3/6/15
to tas...@googlegroups.com
you're welcome. Keep in mind that you will need to work in milliseconds (http://currentmillis.com/ and http://www.unitconversion.org/unit_converter/time.html helped me). For instance in my task I wanted to set the alarm 1 hour before the actual event started:
1 hour --> 3600000 ms

John Doe

unread,
Mar 7, 2015, 3:59:39 AM3/7/15
to tas...@googlegroups.com
I think it's a common use case, "do something X {hour|day} before the calendar event". The solution posted requires root and to play with sql, so it's not a solution for noob users. I really hope the entries on the Pent's TODO list about the calendar events are removed as soon as possible.

Rich D

unread,
Mar 7, 2015, 9:17:26 AM3/7/15
to Tasker Google Groups Post


> I think it's a common use case, "do something X {hour|day} before the calendar event". The solution posted requires root and to play with sql, so it's not a solution for noob users. I really hope the entries on the Pent's TODO list about the calendar events are removed as soon as possible.

You can do this with tasker only actions.  It has been discussed before but I will admit i just searched around for it and did not find a simple workaround posted.  There would be no reason even a noob user could not get it working, (perhaps with a little help from the forum)

You need to use the action' App /Test app / calendar : title or description. Then make a loop that will test your calendar for future events in the smallest time frame you would have for a event, like every 5 min.

Rich D

unread,
Mar 7, 2015, 9:33:54 AM3/7/15
to Tasker Google Groups Post


> You can do this with tasker only actions.

Finally found the post I was thinking about.  This one includes pents suggestion and a working task.

https://groups.google.com/forum/m/#!topic/tasker/3Nq0wxGxAuo

Message has been deleted

John Doe

unread,
Mar 7, 2015, 9:48:20 AM3/7/15
to tas...@googlegroups.com
Yep, it's not the best option but the Pent reply can be a good starting point. Of course easier than sqlite commands ;)

Marta Hintz

unread,
Mar 7, 2015, 11:32:46 AM3/7/15
to tas...@googlegroups.com
For easier, use a plugin like auto-calendar.

Rich D

unread,
Mar 7, 2015, 11:56:56 AM3/7/15
to Tasker Google Groups Post

> For easier,  use a plugin like auto-calendar.

Why are some of his apps so hard to find?  It does not show on a search in play store and is not mentioned on his main site?? Where did you find it?

Marta Hintz

unread,
Mar 7, 2015, 3:56:10 PM3/7/15
to tas...@googlegroups.com
He had several types, regular apps, beta apps and alpha apps. Do use alpha, you need to subscribe. To use beta you become part of beta users. -free, then after apps is completed, you purchase them. Check his site, all the info is there.

John Doe

unread,
Mar 8, 2015, 3:28:58 AM3/8/15
to tas...@googlegroups.com
AutoCalendar is an alpha app so at least at the moment it's not really usable and in my case doesn't work because it works only with google calendar. I think that for a very basic and common task a built-in function is better.

Rich D

unread,
Mar 8, 2015, 9:23:47 AM3/8/15
to Tasker Google Groups Post


> AutoCalendar is an alpha app so at least at the moment it's not really usable and in my case doesn't work because it works only with google calendar.

Glad you could find it. I tried again and still could not get to it.  I even got my secrete decoder ring and became a 'Alpha member'  I must still need the super secret handshake...  :)

I think that for a very basic and common task a built-in function is better.
>
>

I agree that a built in function would be a great addition.

It is always good to post any type of approach that works, for others looking for the same thing. I cant speak for Pent but he seems to shy away from making a built in feature whose exact same results can already be achieved by existing tasker actions. I am not sure of this but it would seem he would have to do the exact same thing behind the scene as we have to do in front of it.

What would be great information to be added here if it is possible to detect when any of your calendars have been modified.   This would take the guess work out of the prosses. ..

Marta Hintz

unread,
Mar 8, 2015, 11:46:39 AM3/8/15
to tas...@googlegroups.com
Users have auto calendar read Google calendar which synchs to their own other calendar as work around. but yes is alpha, so still more changes coming to it.

Alex

unread,
Apr 15, 2015, 9:30:49 AM4/15/15
to tas...@googlegroups.com
I didn't use SQLite in the end, but played around with the built-in Tasker actions. Took me a while to get it working, but using the example task in that post as a reference I ended up with the task below, which seems to do what I want.

I work a variable shift pattern. I want my phone to disable non-essential functions 10.5 hours before the start of my shift, and enable them again 2.5 hours before the start of my shift. But I want this to happen only if I'm not on holiday for any shift.

I have multiple calendars, one of which is devoted solely to my shift pattern (called, imaginatively, "Work"). It will only ever have two types of entries in it: a shift, or an entry called "Annual leave". Nothing else is ever in that calendar.

I figure one check per day should suffice, inspecting every hour for the next 24 hours. The check should be scheduled for 10 minutes after the end of my shift.

After lots of trial and error, this is what I came up with:

* One profile called "Sleep", with From and To time triggers set to variables %GOTOSLEEP and %WAKEUP, which calls separate Sleep and WakeUp entry and exit tasks (not shown here).
* One profile called "CheckShift", with From and To time triggers both set to variable %CHECKSHIFT, which calls the CheckShift task.

Task: CheckShift
Properties -> Collision Handling: Abort Existing Task

Actions:
Variables -> Variable Clear [ Name: %GOTOSLEEP ]
Variable Clear [ Name: %WAKEUP ]
Task -> For [ Variable: %mins / Items: 0:1440:60 ]
    Variables -> Variable Set [Name: %testtime / To: %TIMES+(%mins*60) ]
    App -> Test App [ Type: Calendar Calendar / Data: %testtime / Store Result In: %calnames ]
    Task -> If [ %calnames1 Is Set ]
        For [ Variable: %index / Items 1:%calnames ]
            If [ %calnames(%index) ~ Google:Work ]        // change calendar name to suit requirements
                Test App [ Type: Calendar Title / Data: %testtime / Store Result In: %caltitles ]
                Variable Set [ Name: %annualleave / To: 1 / If: %caltitles(%index) ~ Annual leave ]
                If [ %annualleave Is Set ]
                    Test App [ Type: Calendar Start (Seconds) / Data: %testtime / Store Result In: %calstarts ]
                    Variable Set [ Name: %gotosleeptime / To: %calstarts(%index)-37800 / Do Maths: On ]
                    Variables -> Variable Convert [ Name: %gotosleeptime / Function: Seconds to Date Time ]
                    Variables -> Variable Split [ Name: %gotosleeptime ]
                    Variable Set [ Name: %GOTOSLEEP / To: %gotosleeptime2 / If: %gotosleeptime2 !~ %* ]
                    Variable Set [ Name: %wakeuptime / To: %calstarts(%index)-9000 / Do Maths: On ]
                    Variable Convert [ Name: %wakeuptime / Function: Seconds to Date Time ]
                    Variable Split [ Name: %wakeuptime ]
                    Variable Set [ Name: %WAKEUP / To: %wakeuptime2 / If: %wakeuptime2 !~ %* ]
                    Tasker -> Profile Status [ Name: Sleep / Set: On ]
                    Test App [ Type: Calendar End (Seconds) / Data: %testtime / Store Result In: %calends ]
                    Variable Set [ Name: %checkshifttime / To: %calends(%index)+600 / Do Maths: On ]
                    Variable Convert [ Name: %checkshifttime / Function: Seconds to Date Time ]
                    Variable Split [ Name: %checkshifttime ]
                    Variable Set [ Name: %CHECKSHIFT / To: %checkshifttime2 / If: %checkshifttime2 !~ %* ]
                    Task -> Goto [ Type: End of Loop / If: %gotosleeptime Is Set / Label: Shift found - go to end ]
                Task -> End If
                Profile Status [ Name: Sleep / Set: Off / If: %annualleave Is Set ]
                Goto [ Type: End of Loop / If: %annualleave Is Set / Label: Annual leave - go to end ]
            End If
        Task -> End For
    End If
End For


Thanks for the pointers. I may revise it further to allow for scheduled days off shift, but for now this meets my needs.

Michael

unread,
Apr 16, 2015, 10:23:24 AM4/16/15
to tas...@googlegroups.com
Here's a post I did on reddit that will grab calendar events for the next 12hrs (can be easily changed, or you can get events from a date range) and stores them in Tasker variables.  You could run this every morning and then set a gloabl variable for the alarm time based on the obtained begin time and then use that global variable to have an alarm go off a X hours beforehand.

droopie

unread,
Dec 8, 2015, 5:59:30 PM12/8/15
to Tasker
this is what i am also looking for, getting calendar events before they happen within tasker, not via the calendar notification to run tasks. the best possible link requires the phone to be rooted. another method i saw runs a check fine but i am at a loss on how to attach that to a time that is adaptive for next calendar event.

Rich D

unread,
Dec 9, 2015, 6:11:27 AM12/9/15
to Tasker Google Groups Post


> this is what i am also looking for, getting calendar events before they happen within tasker, not via the calendar notification to run tasks. the best possible link requires the phone to be rooted. another method i saw runs a check fine but i am at a loss on how to attach that to a time that is adaptive for next calendar event.

It would best to post all relevant exported task and profile descriptions.

The easiest way is to convert the start time of the event to 'epoch time' %TIMES . Then subtract the amount of seconds you want a task to run from that.  Then you can use the 'variable time ' context to fire the app. Be aware you can set the time context with a epoch time however it only uses the "time" portion not the date.

There are several posts on how to use %TIMES in the time context.  

To post your profile or task here...  Long press on the profile or task name / ( 3 dot menu with 4.0+ ) export / export "DESCRIPTION" to clipboard (not XML)

Any linked tasks will be exported with the profile they are linked to..

To be able to export, The beginner mode needs to be off and the profile needs to be named by you (Not the Tasker listed name.  Tasker will list your profile with the context name if you have not given it one).

droopie

unread,
Dec 9, 2015, 11:11:20 PM12/9/15
to Tasker
Thank you I am successful in using the variable as a time and firing up. The only problem I have is that the task I'm using gets the calendar data date and time in milliseconds using Java function. I cannot figure out how to convert the milliseconds to strip only keeping the time and using it in 24h format so tasker can use it. Not sure if 5:00pm will be seen as 05.00 instead of 17.00. I am still searching for a way to convert this. The task I'm using was posted above source from Reddit but it is locked.

John Doe

unread,
Dec 10, 2015, 3:03:12 AM12/10/15
to Tasker
You can even look at CalendarTask plugin. It's much more easy to use. It's currently in beta but I think it's quite stable now.

Rich D

unread,
Dec 10, 2015, 5:34:04 AM12/10/15
to Tasker Google Groups Post


I cannot figure out how to convert the milliseconds to strip only keeping the time and using it in 24h format so tasker can use it.

Just multiply (time in ms * 1000)= time in seconds

You can use (time in seconds) directly in the variable time context.

Rich D

unread,
Dec 10, 2015, 5:36:21 AM12/10/15
to Tasker Google Groups Post

I meant divide of course.... :/

> Just multiply (time in ms / 1000)= time in seconds

droopie

unread,
Dec 11, 2015, 6:04:51 PM12/11/15
to Tasker
Your advice has been great! The only issue in having is that I created a variable %NextCalEvent from the %beginO calendar milliseconds but for some reason that is not the 1st event that starts. It's more like the middle event. While the %beganArr is displaying properly.
Query Calendar (268)
A1: Java Function [ Return:cr Class Or Object:CONTEXT Function:getContentResolver
{ContentResolver} () Param: Param: Param: Param: Param: Param: Param: ]
A2: Java Function [ Return:cal Class Or Object:Calendar Function:getInstance
{Calendar} () Param: Param: Param: Param: Param: Param: Param: ]
A3: [X] Java Function [ Return: Class Or Object:cal Function:set
{} (int, int, int, int, int) Param:2015 Param:3 Param:15 Param:0 Param:0 Param: Param: ]
A4: Java Function [ Return:startday Class Or Object:cal Function:getTimeInMillis
{long} () Param: Param: Param: Param: Param: Param: Param: ]
A5: [X] Java Function [ Return: Class Or Object:cal Function:set
{} (int, int, int, int, int) Param:2015 Param:3 Param:22 Param:23 Param:59 Param: Param: ]
A6: Java Function [ Return: Class Or Object:cal Function:add
{} (int, int) Param:10 Param:12 Param: Param: Param: Param: Param: ]
A7: Java Function [ Return:endday Class Or Object:cal Function:getTimeInMillis
{long} () Param: Param: Param: Param: Param: Param: Param: ]
A8: Java Function [ Return:%startday Class Or Object:Long Function:toString
{String} (long) Param:startday Param: Param: Param: Param: Param: Param: ]
A9: Java Function [ Return:%endday Class Or Object:Long Function:toString
{String} (long) Param:endday Param: Param: Param: Param: Param: Param: ]
A10: Java Function [ Return:uriIn Class Or Object:Uri Function:parse
{Uri} (String) Param:content://com.android.calendar/instances/when Param: Param: Param: Param: Param: Param: ]
A11: Java Function [ Return:builder Class Or Object:uriIn Function:buildUpon
{android.net.Uri$Builder} () Param: Param: Param: Param: Param: Param: Param: ]
A12: Java Function [ Return: Class Or Object:ContentUris Function:appendId
{android.net.Uri$Builder} (android.net.Uri$Builder, long) Param:builder Param:%startday Param: Param: Param: Param: Param: ]
A13: Java Function [ Return: Class Or Object:ContentUris Function:appendId
{android.net.Uri$Builder} (android.net.Uri$Builder, long) Param:builder Param:%endday Param: Param: Param: Param: Param: ]
A14: Java Function [ Return:builtURI Class Or Object:builder Function:build
{Uri} () Param: Param: Param: Param: Param: Param: Param: ]
A15: Variable Set [ Name:%proj To:begin,end,title,description,allDay,eventLocation Do Maths:Off Append:Off ]
A16: Java Function [ Return:proj Class Or Object:String Function:new
{String} (String) Param:%proj Param: Param: Param: Param: Param: Param: ]
A17: Java Function [ Return:projection Class Or Object:proj Function:split
{String[]} (String) Param:, Param: Param: Param: Param: Param: Param: ]
A18: Java Function [ Return:cur Class Or Object:cr Function:query
{Cursor} (Uri, String[], String, String[], String) Param:builtURI Param:projection Param: Param: Param:begin ASC Param: Param: ]
A19: Java Function [ Return:%count Class Or Object:cur Function:getCount
{int} () Param: Param: Param: Param: Param: Param: Param: ]
A20: Array Clear [ Name:%beginArr ]
A21: Array Clear [ Name:%endArr ]
A22: Array Clear [ Name:%titleArr ]
A23: Array Clear [ Name:%descArr ]
A24: Array Clear [ Name:%alldayArr ]
A25: Array Clear [ Name:%locArr ]
A26: Java Function [ Return:formatter Class Or Object:SimpleDateFormat Function:new
{SimpleDateFormat} (String) Param:MM/dd/yyyy hh:mm a Param: Param: Param: Param: Param: Param: ]
A27: Java Function [ Return:tz Class Or Object:TimeZone Function:getDefault
{TimeZone} () Param: Param: Param: Param: Param: Param: Param: ]
A28: Java Function [ Return:%tzSec Class Or Object:tz Function:getRawOffset
{int} () Param: Param: Param: Param: Param: Param: Param: ]
A29: Java Function [ Return:%dstSec Class Or Object:tz Function:getDSTSavings
{int} () Param: Param: Param: Param: Param: Param: Param: ]
A30: If [ %count > 0 ]
A31: Variable Set [ Name:%endNo To:%count-1 Do Maths:On Append:Off ]
A32: For [ Variable:%itr Items:0:%endNo ]
A33: Java Function [ Return: Class Or Object:cur Function:moveToPosition
{boolean} (int) Param:%itr Param: Param: Param: Param: Param: Param: ]
A34: Java Function [ Return:%allday Class Or Object:cur Function:getString
{String} (int) Param:4 Param: Param: Param: Param: Param: Param: ]
A35: If [ %allday eq 1 ]
A36: Variable Set [ Name:%offset To:(%tzSec+%dstSec) Do Maths:On Append:Off ]
A37: Else
A38: Variable Set [ Name:%offset To:0 Do Maths:Off Append:Off ]
A39: End If
A40: Java Function [ Return:%beginO Class Or Object:cur Function:getLong
{long} (int) Param:0 Param: Param: Param: Param: Param: Param: ]
A41: Variable Set [ Name:%beginO To:%beginO-%offset Do Maths:On Append:Off ]
A42: If [ %beginO > %endday ]
A43: Goto [ Type:Top of Loop Number:1 Label: ]
A44: End If
A45: Java Function [ Return:begin Class Or Object:Long Function:parseLong
{long} (String) Param:%beginO Param: Param: Param: Param: Param: Param: ]
A46: Java Function [ Return: Class Or Object:cal Function:setTimeInMillis
{} (long) Param:begin Param: Param: Param: Param: Param: Param: ]
A47: Java Function [ Return:dte Class Or Object:cal Function:getTime
{Date} () Param: Param: Param: Param: Param: Param: Param: ]
A48: Java Function [ Return:%begin Class Or Object:formatter Function:format
{String} (Date) Param:dte Param: Param: Param: Param: Param: Param: ]
A49: Java Function [ Return:%endO Class Or Object:cur Function:getLong
{long} (int) Param:1 Param: Param: Param: Param: Param: Param: ]
A50: Variable Set [ Name:%endO To:%endO-%offset Do Maths:On Append:Off ]
A51: Java Function [ Return:end Class Or Object:Long Function:parseLong
{long} (String) Param:%endO Param: Param: Param: Param: Param: Param: ]
A52: Java Function [ Return: Class Or Object:cal Function:setTimeInMillis
{} (long) Param:end Param: Param: Param: Param: Param: Param: ]
A53: Java Function [ Return:dte Class Or Object:cal Function:getTime
{Date} () Param: Param: Param: Param: Param: Param: Param: ]
A54: Java Function [ Return:%end Class Or Object:formatter Function:format
{String} (Date) Param:dte Param: Param: Param: Param: Param: Param: ]
A55: Java Function [ Return:%title Class Or Object:cur Function:getString
{String} (int) Param:2 Param: Param: Param: Param: Param: Param: ]
A56: Java Function [ Return:%desc Class Or Object:cur Function:getString
{String} (int) Param:3 Param: Param: Param: Param: Param: Param: ]
A57: Java Function [ Return:%eventloc Class Or Object:cur Function:getString
{String} (int) Param:5 Param: Param: Param: Param: Param: Param: ]
A58: Variable Set [ Name:%itrArr To:%itr+1 Do Maths:On Append:Off ]
A59: Array Push [ Name:%beginArr Position:%itrArr Value:%begin Fill Spaces:Off ]
A60: Array Push [ Name:%endArr Position:%itrArr Value:%end Fill Spaces:Off ]
A61: Array Push [ Name:%titleArr Position:%itrArr Value:%title Fill Spaces:Off ]
A62: Array Push [ Name:%descArr Position:%itrArr Value:%desc Fill Spaces:Off ]
A63: Array Push [ Name:%locArr Position:%itrArr Value:%eventloc Fill Spaces:Off ]
A64: Array Push [ Name:%alldayArr Position:%itrArr Value:%allday Fill Spaces:Off ]
A65: End For
A66: [X] Else
A67: [X] Flash [ Text:No calendar events Long:Off ]
A68: End If
A69: If [ %beginArr(#) < 1 ]
A70: Flash [ Text:No calendar events Long:Off ]
A71: Else
A72: Variable Set [ Name:%NextCalEvent To:%beginO / 1000 Do Maths:On Append:Off ]
A73: Variable Set [ Name:%NextCalEvent To:%NextCalEvent - 4500 Do Maths:On Append:Off ]
A74: Variable Convert [ Name:%NextCalEvent Function:Seconds to Date Time Store Result In: ]
A75: Variable Section [ Name:%NextCalEvent From:12 Length:5 Adapt To Fit:On Store Result In:%NextCalEvent ]
A76: Flash [ Text:%NextCalEvent Long:Off ]
A77: End If

I used %beginO to get the event so converted it to seconds then subtracted 15min and 60min (wasn't sure if I'm in central time and this is being displayed as eastern time) then selected the time to a create a time condition.

Rich D

unread,
Dec 13, 2015, 7:41:31 AM12/13/15
to Tasker Google Groups Post


> Your advice has been great! The only issue in having is that I created a variable %NextCalEvent from the %beginO calendar milliseconds but for some reason that is not the 1st event that starts. It's more like the middle event. While the %beganArr is displaying properly.

It is a bit hard to follow the java code but it looks like the begin time of the first event should be in %beginArr(1).  Why are you using %beginO. ?




Stephan

unread,
Mar 27, 2016, 7:19:35 AM3/27/16
to Tasker
First i'd like to thank you for sharing this Task. I work in shifts as well and this really helped me out.

However I have one problem with the selection of the calendar name.
In my Google calendar I have multiple calenders active (normal agenda, birthdays, work, national holidays, F1 races etc.)

When I run the task it will store only 3 %calnames variables e.g. %calnames: (); %calnames1: (Google:agenda); %calnames2: (Google:nationalholidays). Then no variables are added so it does not include my other calendars such as work (with my schedule info).
At the moment i fixed this by importing my work calender to my normal agenda, however this is not an ideal solution because it will set the alarm also for other (non work related) items.

Is there anything I can do to let Tasker add the remaining calendars as variables so I can filter the appropriate calendar out? 

Thank you

 
Task: CheckShift
Properties -> Collision Handling: Abort Existing Task

Actions:
Variables -> Variable Clear [ Name: %GOTOSLEEP ]
Variable Clear [ Name: %WAKEUP ]
Task -> For [ Variable: %mins / Items: 0:1440:60 ]
    Variables -> Variable Set [Name: %testtime / To: %TIMES+(%mins*60) ]
    App -> Test App [ Type: Calendar Calendar / Data: %testtime / Store Result In: %calnames ]
    Task -> If [ %calnames1 Is Set ]
        For [ Variable: %index / Items 1:%calnames ]
            If [ %calnames(%index) ~ Google:Work ]        // change calendar name to suit requirements
                Test App [ Type: Calendar Title / Data: %testtime / Store Result In: %caltitles ]
                Variable Set [ Name: %annualleave / To: 1 / If: %caltitles(%index) ~ Annual leave ]
                If [ %annualleave Is Set ]
...

Rich D

unread,
Mar 27, 2016, 9:12:57 AM3/27/16
to Tasker Google Groups Post

Hard to say without complete export but it looks like this..

   For [ Variable: %index / Items 1:%calnames ]

Should be this

   For [ Variable: %index / Items 1:%calnames(#) ]

Reply all
Reply to author
Forward
0 new messages