Advertisement
mvan231

Change Calendar of Event - Scriptable

Aug 11th, 2021
1,548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //this is to change the calendar of a calendar event
  2.  
  3. let event = await CalendarEvent.today()
  4. //log(event)
  5.  
  6. let cal = event[0]['calendar']
  7. //log(cal)
  8.  
  9.  
  10.  
  11.  
  12. var calcal
  13.  
  14. await Calendar.forEventsByTitle('Family').then(successCallback)
  15.  
  16. event[0]['calendar']=calcal
  17. log('line20')
  18. log(event[0]['calendar'])
  19. event[0].save()
  20.  
  21. async function successCallback(result) {
  22.   calcal = result
  23.   console.log(calcal)
  24. //   console.log(calcal[0])
  25.   console.log(calcal.title)
  26.   //calSet(calcal[0])
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement