Is this possible?

Hey,

I am quite the newbie, infact I haven’t even made a single script, but finally I want to make one, since I have thought of something I might need.

I like using “address book” with my phone for bluetooth for sending SMS and the like, but I don’t like when you put the laptop to sleep or whatever and it disconnects, is there a way to make a script that runs and if the phone isn’t connected it searchs like every few minutes and connects automaticly if the phone is near? and the bluetooth isn’t currently doing something else?

Cheers.