I've been using this script http://ubuntuforums.org/showthread.p...398&page=1
You have to edit the script that's included in the download and change two really basic parameters (wireless device and home directory) and you're good to go.
When you run it, you'll be asked to choose from a list of available networks. Once you've chosen that network, it's added to your preferred list. Your preferred list is located in ~/.wifi-preferred so you can edit it anytime you want.
I added it to my startup programs in my Gnome Session, and it automatically connects me to anything that's on my preferred networks list when I log in. Works great!