computergroove Posted February 24, 2016 Posted February 24, 2016 (edited) 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 ExitLoop Else DirCreate("c:\Users\user\Documents\Google Calendar Backups") EndIf If @error Then MsgBox(0,"Google Calendar Backup Problem Encountered","Error 1") EndIf _IENavigate($oIE,"https://accounts.google.com/Logout?service=cl&continue=https://calendar.google.com/calendar/render");logout link for google calendar Sleep(10000) Send($password & "{ENTER}") Sleep(10000) _IENavigate($oIE,"Redacted");Link to the calendar settings I want to backup Sleep(10000) 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 February 24, 2016 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
junkew Posted February 24, 2016 Posted February 24, 2016 Why avoiding mouseclick? If it gets the job done you should use that. Iuiautomation thread in examples is also native windows but its all about gui moving mouse and simulating keyboard. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now