Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Task: Test - TaskerCal
- Settings: Run Both Together
- <Creating needed variables>
- A1: If [ 1 = 1 ]
- A2: Multiple Variables Set [
- Names: %cal=Google:Vasking
- %tocalendar=lars@XXX.no
- Values Splitter: =
- Structure Output (JSON, etc): On ]
- A3: Variable Set [
- Name: %empty
- To:
- Structure Output (JSON, etc): On ]
- A4: Variable Search Replace [
- Variable: %empty
- Search: [\s+\d+] ]
- A5: Variable Set [
- Name: %empty2
- To: %empty
- Structure Output (JSON, etc): On ]
- A6: End If
- A7: Parse/Format DateTime [
- Input Type: Now (Current Date And Time)
- Output Format: HH:mm:ss
- Output Offset Type: None ]
- A8: Variable Set [
- Name: %TestOutput
- To: ___
- %formatted : Initiating
- Events in list: %ctevents()
- Calendar: %ctcalendar
- Append: On
- Structure Output (JSON, etc): On ]
- A9: Popup [
- Text: Triggering
- Events in list: %ctevents()
- Calendar: %ctcalendar
- Layout: Popup
- Timeout (Seconds): 5
- Show Over Keyguard: On ]
- A10: If [ %ctcalendar ~ *lkvanum* ]
- A11: Multiple Variables Set [
- Names: %ce_account=%empty
- %ce_account_type=%empty
- %ce_calendar=%empty
- %ce_color=%empty
- %ce_description=%empty
- %ce_ent_time=%empty
- %ce_evt_id=%empty
- %ce_location=%empty
- %ce_owner_account=%empty
- %ce_start_time=%empty
- %ce_timezone=%empty
- %ce_title=%empty
- %ce_visible=%empty
- %ce_attendee_id()=%empty
- %ce_attendee_email()=%empty
- %ce_attendee_relationship()=%empty
- %ce_attendee_relationship_code()=%empty
- %ce_attendee_status()=%empty
- %ce_attendee_type()=%empty
- %ce_attendee_type_code()=%empty
- %ce_reminder_method()=%empty
- %ce_reminder_method_code()=%empty
- %ce_reminder_minutes_prior()=%empty
- %ce_reminder_id()=%empty
- %ce_all_day=false
- %ce_available=free
- %ce_guests_can_invite=true
- %ce_guests_can_modify=false
- %ce_guests_can_see_guests=true
- %ce_is_organizer=true
- Values Splitter: =
- Structure Output (JSON, etc): On ]
- A12: For [
- Variable: %event_id
- Items: %ctevents()
- Structure Output (JSON, etc): On ]
- If [ %ctevents(#) > 0 ]
- A13: Variable Set [
- Name: %TestOutput
- To:
- Step 1
- Getting event details for: %event_id
- Append: On
- Structure Output (JSON, etc): On ]
- <Getting information from existing>
- A14: If [ 2 Even ]
- A15: Get Calendar Events [
- Event ID: %event_id
- Continue Task After Error:On ]
- A16: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- A17: Get Calendar Attendees [
- Event ID: %event_id
- Continue Task After Error:On ]
- A18: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- A19: Get Calendar Reminders [
- Event ID: %event_id
- Continue Task After Error:On ]
- A20: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- <Error handling block>
- A21: If [ %tmp_err > 0 ]
- A22: Variable Set [
- Name: %TestOutput
- To:
- Stopping after error!
- Error: %tmp_err
- Append: On
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- A23: Popup [
- Title: Error caught
- Text: Stopped with an error: %tmp_err
- Layout: Popup
- Timeout (Seconds): 5
- Show Over Keyguard: On ]
- A24: Stop [
- With Error: On ]
- A25: End If
- A26: Variable Set [
- Name: %TestOutput
- To:
- Step 2:
- %ce_account
- %ce_account_type
- %ce_all_day
- %ce_available
- %ce_calendar
- %ce_color
- %ce_description
- %ce_ent_time
- %ce_evt_id
- %ce_guests_can_invite
- %ce_guests_can_modify
- %ce_guests_can_see_guests
- %ce_is_organizer
- %ce_location
- %ce_owner_account
- %ce_start_time
- %ce_timezone
- %ce_title
- %ce_visible
- * Get Calendar Attendees
- %ce_attendee_id()
- %ce_attendee_email()
- %ce_attendee_relationship()
- %ce_attendee_relationship_code()
- %ce_attendee_status()
- %ce_attendee_type()
- %ce_attendee_type_code()
- * Get Calendar Reminders
- %ce_reminder_method()
- %ce_reminder_method_code()
- %ce_reminder_minutes_prior()
- %ce_reminder_id()
- Append: On
- Structure Output (JSON, etc): On ]
- A27: End If
- <Deleting old one>
- A28: Edit Calendar Event [
- Action: Delete
- Event ID: %event_id
- Continue Task After Error:On ]
- <Start of error handling...>
- A29: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- <Error handling block>
- A30: If [ %tmp_err > 0 ]
- A31: Variable Set [
- Name: %TestOutput
- To:
- Stopping after error!
- Error: %tmp_err
- Append: On
- Structure Output (JSON, etc): On ]
- A32: Popup [
- Title: Error caught
- Text: Stopped with an error: %tmp_err
- Layout: Popup
- Timeout (Seconds): 5
- Show Over Keyguard: On ]
- A33: Stop [
- With Error: On ]
- A34: End If
- A35: Variable Set [
- Name: %TestOutput
- To:
- Step 3: Original deleted
- Append: On
- Structure Output (JSON, etc): On ]
- If [ %ce_event_id Set ]
- <Add new event>
- A36: Edit Calendar Event [
- Action: Add
- Calendar: Google:lars@XXX.no
- Title: %ce_title
- Start Time: %ce_start_time
- End Time: %ce_end_time
- Continue Task After Error:On ]
- <Start of error handling...>
- A37: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- <Error handling block>
- A38: If [ %tmp_err > 0 ]
- A39: Variable Set [
- Name: %TestOutput
- To:
- Stopping after error!
- Error: %tmp_err
- Append: On
- Structure Output (JSON, etc): On ]
- A40: Popup [
- Title: Error caught
- Text: Stopped with an error: %tmp_err
- Layout: Popup
- Timeout (Seconds): 5
- Show Over Keyguard: On ]
- A41: Stop [
- With Error: On ]
- A42: End If
- A43: If [ %ce_event_id Set ]
- A44: Edit Calendar Reminder [
- Action: Update
- Event ID: %ce_event_id
- Reminder ID: %ce_reminder_id()
- Minutes Prior: %ce_reminder_minutes_prior()
- Method: %ce_reminder_method()
- Continue Task After Error:On ]
- <Start of error handling...>
- A45: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- A46: Edit Calendar Attendee [
- Action: Update
- Event ID: %ce_event_id
- Attendee ID: %ce_attendee_id()
- Name: %ce_attendee_name()
- Email: %ce_attendee_email()
- Status: %ce_attendee_status()
- Relationship: %ce_attendee_relationship()
- Type: %ce_attendee_type()
- Continue Task After Error:On ]
- <Start of error handling...>
- A47: Variable Set [
- Name: %tmp_err
- To: %err
- Structure Output (JSON, etc): On
- Continue Task After Error:On ]
- <Error handling block>
- A48: If [ %tmp_err > 0 ]
- A49: Variable Set [
- Name: %TestOutput
- To:
- Stopping after error!
- Error: %tmp_err
- Append: On
- Structure Output (JSON, etc): On ]
- A50: Popup [
- Title: Error caught
- Text: Stopped with an error: %tmp_err
- Layout: Popup
- Timeout (Seconds): 5
- Show Over Keyguard: On ]
- A51: Stop [
- With Error: On ]
- A52: End If
- A53: End If
- A54: End For
- A55: Else
- A56: Variable Set [
- Name: %TestOutput
- To: ___
- %formatted : Initiating
- Events in list: %ctevents()
- Calendar: %ctcalendar
- Append: On
- Structure Output (JSON, etc): On ]
- A57: End If
- A58: Parse/Format DateTime [
- Input Type: Now (Current Date And Time)
- Output Format: HH:mm:ss
- Output Offset Type: None ]
- A59: Variable Set [
- Name: %TestOutput
- To: %formatted : Completed!
- ___
- Append: On
- Structure Output (JSON, etc): On ]
- A60: Popup [
- Text: Completed!
- Layout: Popup
- Timeout (Seconds): 5
- Show Over Keyguard: On ]
- <Cleaning up>
- A61: If [ 1 = 1 ]
- A62: Send email [
- Configuration: Send email from lXXX@gmail.com to Lars@XXX.no
- Timeout (Seconds): 0
- Structure Output (JSON, etc): On ]
- A63: Variable Clear [
- Name: %TestOutput ]
- A64: End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement