Check if wireless is on

My laptop has wifi built in and a little switch on the front to switch it on/off. I have my e-mail client open at startup and just run in the background. But if the wireless is off, when I’m out of range or somethingit opens and complains that it can’t connect. Is there a way to make it run at startup but only when the wireless switch is on?

Which email client?

Highly doubtful, easier method would be maing the email proggy not startup and double click if you need to. Simple as that.

^, or single click if you put it in the quick launch taskbar.