Advertisement
Guest User

Untitled

a guest
Mar 25th, 2025
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.68 KB | None | 0 0
  1. Task: Tmp2_CalendarEventListener
  2.  
  3. <Creating new event>
  4. A1: If [ 1 ~ 1 ]
  5.  
  6. A2: Multiple Variables Set [
  7. %ce_account_type=com.google.android.gm.exchange
  8. %ce_is_organizer=false
  9. %ce_visible=true
  10. %ce_title=Tasker test
  11. %ce_description=A test of tasker
  12. %ce_start_time=1742850000000
  13. %ce_end_time=1742851800000
  14. %ce_timezone=Europe/Oslo
  15. %ce_all_day=false
  16. %ce_location=Oslo, Norge
  17. %ce_available=false
  18. %ce_color=#71AEA7
  19. %ce_guests_can_invite=true
  20. %ce_guests_can_modify=true
  21. %ce_guests_can_see_guests=true
  22. %ce_attendee_id1=525
  23. %ce_attendee_name1=Lars
  24. %ce_attendee_relationship1=owner
  25. %ce_attendee_relationship_code1=required
  26. %ce_attendee_status1=Accepted
  27. %ce_attendee_status_code1=1
  28. %ce_attendee_type1=Required
  29. %ce_attendee_type_code1=1
  30. %ce_attendee_id2=526
  31. %ce_attendee_name2=Lars
  32. %ce_attendee_relationship2=speaker
  33. %ce_attendee_relationship_code2=optional
  34. %ce_attendee_status2=Invited
  35. %ce_attendee_status_code2=3
  36. %ce_attendee_type2=Required
  37. %ce_attendee_type_code2=1
  38. %ce_reminder_id1=250
  39. %ce_reminder_method1=Alert
  40. %ce_reminder_method_code1=1
  41. %ce_reminder_minutes_prior1=30
  42. Values Splitter: =
  43. Structure Output (JSON, etc): On ]
  44.  
  45. A3: Parse/Format DateTime [
  46. Input Type: Now (Current Date And Time)
  47. Output Offset Type: None
  48. Time Zone: Europe/Oslo ]
  49.  
  50. A4: Variable Set [
  51. Name: %ce_start_time
  52. To: %TIMEMS+(60*60*1000*2)
  53. Do Maths: On
  54. Max Rounding Digits: 3
  55. Structure Output (JSON, etc): On ]
  56.  
  57. A5: Variable Set [
  58. Name: %ce_end_time
  59. To: %ce_start_time+(60*60*1000*2)
  60. Do Maths: On
  61. Max Rounding Digits: 3
  62. Structure Output (JSON, etc): On ]
  63.  
  64. A6: Edit Calendar Event [
  65. Action: Add
  66. Calendar: Google:[email protected]
  67. Title: %ce_title
  68. Description: %ce_description
  69. All Day: %ce_all_day
  70. Start Time: %ce_start_time
  71. End Time: %ce_end_time
  72. Organizer: %ce_is_organizer
  73. Location: %ce_location
  74. Availability: %ce_available
  75. Colour: %ce_color ]
  76.  
  77. <Start recursing through attendees>
  78. A7: If [ %ce_attendee_id(#) > 0 ]
  79.  
  80. A8: Variable Set [
  81. Name: %attendee_id
  82. To: 0
  83. Structure Output (JSON, etc): On ]
  84.  
  85. <Recurse_attendees>
  86. A9: Variable Set [
  87. Name: %attendee_id
  88. To: %attendee_id+1
  89. Do Maths: On
  90. Max Rounding Digits: 3
  91. Structure Output (JSON, etc): On ]
  92.  
  93. A10: Edit Calendar Attendee [
  94. Action: Update
  95. Event ID: %ce_event_id
  96. Attendee ID: %ce_attendee_id(%attendee_id)
  97. Name: %ce_attendee_name(%attendee_id)
  98. Email: %ce_attendee_email(%attendee_id)
  99. Status: %ce_attendee_status(%attendee_id)
  100. Relationship: %ce_attendee_relationship(%attendee_id)
  101. Type: %ce_attendee_type(%attendee_id) ]
  102.  
  103. A11: Goto [
  104. Type: Action Label
  105. Label: Recurse_attendees ]
  106. If [ %attendee_id < %ce_attendee_id(#) ]
  107.  
  108. A12: Else
  109.  
  110. A13: List Dialog [
  111. Mode: Select Single Item
  112. Title: Debug
  113. Items: No attendees...
  114. Event ID: %ce_event_id
  115. Attendee ID: %ce_attendee_id(%attendee_id)
  116. Name: %ce_attendee_name(%attendee_id)
  117. Email: %ce_attendee_email(%attendee_id)
  118. Status: %ce_attendee_status(%attendee_id)
  119. Relationship: %ce_attendee_relationship(%attendee_id)
  120. Type: %ce_attendee_type(%attendee_id)
  121. Close After (Seconds): 30
  122. First Visible Index: 0 ]
  123.  
  124. <End recursing through attendees>
  125. A14: End If
  126.  
  127. <Start recursing through reminders>
  128. A15: If [ %ce_reminder_id(#) > 0 ]
  129.  
  130. A16: Variable Set [
  131. Name: %reminder_id
  132. To: 0
  133. Structure Output (JSON, etc): On ]
  134.  
  135. <Recurse_reminders>
  136. A17: Variable Set [
  137. Name: %reminder_id
  138. To: %reminder_id+1
  139. Do Maths: On
  140. Max Rounding Digits: 3
  141. Structure Output (JSON, etc): On ]
  142.  
  143. A18: Edit Calendar Reminder [
  144. Action: Update
  145. Event ID: %ce_event_id
  146. Reminder ID: %ce_reminder_id(%reminder_id)
  147. Minutes Prior: %ce_reminder_minutes_prior(%reminder_id)
  148. Method: %ce_reminder_method(%reminder_id) ]
  149.  
  150. A19: Goto [
  151. Type: Action Label
  152. Label: Recurse_reminders ]
  153. If [ %reminder_id < %ce_reminder_id(#) ]
  154.  
  155. A20: Else
  156.  
  157. A21: [X] List Dialog [
  158. Mode: Select Single Item
  159. Title: Debug
  160. Items: No reminders...
  161. Event ID: %ce_event_id 
  162. Reminder ID: %ce_reminder_id(%reminder_id)
  163. Minutes prior: %ce_reminder_minutes_prior(%reminder_id)
  164. Method: %ce_reminder_method(%reminder_id)
  165. Close After (Seconds): 30
  166. First Visible Index: 0 ]
  167.  
  168. <End recursing through reminders>
  169. A22: End If
  170.  
  171. A23: End If
  172.  
  173. <Reading back>
  174. A24: If [ 1 ~ 1 ]
  175.  
  176. A25: Get Calendar Events [
  177. Event ID: %ce_event_id ]
  178.  
  179. A26: Stop [ ]
  180. If [ %ce_account !~R lXXXm.* ]
  181.  
  182. A27: Get Calendar Reminders [
  183. Event ID: %cc_event_ids_added1 ]
  184.  
  185. A28: Get Calendar Attendees [
  186. Event ID: %cc_event_ids_added1 ]
  187.  
  188. <Add new event>
  189. A29: Edit Calendar Event [
  190. Action: Add
  191. Calendar: Google:[email protected]
  192. Title: %ce_title
  193. Description: %ce_description
  194. All Day: %ce_all_day
  195. Start Time: %ce_start_time
  196. End Time: %ce_end_time
  197. Location: %ce_location
  198. Availability: %ce_available
  199. Colour: %ce_color ]
  200.  
  201. <Start recursing through attendees>
  202. A30: If [ %ce_attendee_id(#) > 0 ]
  203.  
  204. A31: Variable Set [
  205. Name: %attendee_id
  206. To: 0
  207. Structure Output (JSON, etc): On ]
  208.  
  209. <Recurse_attendees>
  210. A32: Variable Set [
  211. Name: %attendee_id
  212. To: %attendee_id+1
  213. Do Maths: On
  214. Max Rounding Digits: 3
  215. Structure Output (JSON, etc): On ]
  216.  
  217. A33: List Dialog [
  218. Mode: Select Single Item
  219. Title: Debug
  220. Items: Event ID: %ce_event_id
  221. , Attendee ID: %ce_attendee_id(%attendee_id)
  222. , Name: %ce_attendee_name(%attendee_id)
  223. , Email: %ce_attendee_email(%attendee_id)
  224. , Status: %ce_attendee_status(%attendee_id)
  225. , Relationship: %ce_attendee_relationship(%attendee_id)
  226. , Type: %ce_attendee_type(%attendee_id)
  227. Close After (Seconds): 30
  228. First Visible Index: 0 ]
  229.  
  230. A34: Edit Calendar Attendee [
  231. Action: Update
  232. Event ID: %ce_event_id
  233. Attendee ID: %ce_attendee_id(%attendee_id)
  234. Name: %ce_attendee_name(%attendee_id)
  235. Email: %ce_attendee_email(%attendee_id)
  236. Status: %ce_attendee_status(%attendee_id)
  237. Relationship: %ce_attendee_relationship(%attendee_id)
  238. Type: %ce_attendee_type(%attendee_id) ]
  239.  
  240. A35: Goto [
  241. Type: Action Label
  242. Label: Recurse_attendees ]
  243. If [ %attendee_id < %ce_attendee_id(#) ]
  244.  
  245. A36: Else
  246.  
  247. <End recursing through attendees>
  248. A37: End If
  249.  
  250. <Start recursing through reminders>
  251. A38: If [ %ce_reminder_id(#) > 0 ]
  252.  
  253. A39: Variable Set [
  254. Name: %reminder_id
  255. To: 0
  256. Structure Output (JSON, etc): On ]
  257.  
  258. <Recurse_reminders>
  259. A40: Variable Set [
  260. Name: %reminder_id
  261. To: %reminder_id+1
  262. Do Maths: On
  263. Max Rounding Digits: 3
  264. Structure Output (JSON, etc): On ]
  265.  
  266. A41: List Dialog [
  267. Mode: Select Single Item
  268. Title: Debug
  269. Items: Event ID: %ce_event_id
  270.  
  271. Reminder ID: %ce_reminder_id(%reminder_id)
  272. Minutes prior: %ce_reminder_minutes_prior(%reminder_id)
  273. Method: %ce_reminder_method(%reminder_id)
  274. Close After (Seconds): 30
  275. First Visible Index: 0 ]
  276.  
  277. A42: Edit Calendar Reminder [
  278. Action: Update
  279. Event ID: %ce_event_id
  280. Reminder ID: %ce_reminder_id(%reminder_id)
  281. Minutes Prior: %ce_reminder_minutes_prior(%reminder_id)
  282. Method: %ce_reminder_method(%reminder_id) ]
  283.  
  284. A43: Goto [
  285. Type: Action Label
  286. Label: Recurse_reminders ]
  287. If [ %reminder_id < %ce_reminder_id(#) ]
  288.  
  289. A44: Else
  290.  
  291. <End recursing through reminders>
  292. A45: End If
  293.  
  294. A46: End If
  295.  
  296.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement