I often tether my laptop through my iPhone to go online when I'm out and about.

Right now I do this manually by looking at the list of available Bluetooth devices and choosing "connect using access point" from the menu bar.

Is there a way to automate this so that my laptop just connects to the phone automatically if there's no regular WiFi present? If it can't be made fully automatic, I'll happily take a script or something similar that at least makes it easier.