I'm looking for the best way to get some help with coding whatever language it may be in.

This is my dream: to have a little program that will run in the background on my Mac environment and will (in the background still) go to a website, log in with credentials, click 'yes' to a pop up window, click a couple links on the page and take all the calendar information and import it to iCal.

Basically, I want to end up with input: me clicking a file of some sort - output: me receiving an .ics file from this website.

I can give more information on how the format on the site is but I am not sure where to even start for assistance with something like this.

Thoughts?