Jump to content

Issue automating Google Calendar file export

Recommended Posts


I need to make a script that exports the google calendar to the local disk once a day and will have 10 backups before the oldest backup is overwritten. I will schedule this to run at 3am in the windows scheduler so it will only run once a day. I want to use IE because it's native to Windows. This is what I have:

#include <IE.au3>
#include <Date.au3>
#include <MsgBoxConstants.au3>

$password = "your password"

If FileExists("c:\Users\user\Documents\Google Calendar Backups") Then
    DirCreate("c:\Users\user\Documents\Google Calendar Backups")
If @error Then
    MsgBox(0,"Google Calendar Backup Problem Encountered","Error 1")
_IENavigate($oIE,"https://accounts.google.com/Logout?service=cl&continue=https://calendar.google.com/calendar/render");logout link for google calendar
Send($password & "{ENTER}")
_IENavigate($oIE,"Redacted");Link to the calendar settings I want to backup
InetGet("Redacted","c:\Users\user\Documents\Google Calendar Backups\file.ical.zip");direct link to the export link for the file Im trying to save.

The directory gets created but the file never shows up in the directory. I have also tried to just save it to the root of c:\ with no luck. The link is an encrypted link like "https://calendar.google.com/calendar/exporticalzip?cexp=b2NqdTkxaWlyODQ2ZzhibGJlZm5vbzBkaGdAZ3JvdXAuY2FsZW5kYXIuZ29vZQ" (not the real link). Will this likely change over time? If so then is there a better way to automate this? I'm trying not to use mouseclick for this.

Edited by computergroove

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.