Opening a browser and checking web based email

I would like to have a script to open a browser (either Firefox or Safari) and open my Google Apps email account - I have it set to auto log in, so that makes it simpler I would imagine. For now, use the web address of http://www.example.com and I will put the proper web address in there.

If it helps at all, I have an extension in Firefox called Permatab to always have a tab open to s specific page, and that page happens to be the email account.

I am trying to set up the voice command of “Get my mail” or something similar to that anyway, and I like the interface of Google Mail much more than iMail. On asking at the Apple support it was indicated to write an AppleScript and put it in a specofic location, but I am clueless on how to write it.

Here you go.

Regards,

Craig


set fullPath to "[url=http://www.example.com]www.example.com[/url]"

--Open in Firefox
tell application "Firefox"
	activate
	tell document 1
		OpenURL fullPath
	end tell
end tell


--Open in Safari
tell application "Safari"
	activate
	if not (exists document 1) then
		make new document at beginning
	end if
	tell document 1
		set URL to fullPath
	end tell
end tell