Bluetooth Proximity Detection on OS X pointed me to these great Apple Scripts posted here using the Proximity tool which monitors the proximity of configured Bluetooth devices and executes custom AppleScripts when the device goes out of range or comes into range of your computer.

Unfortunately, the Apple Scripts on the mentioned sites are not available to download and/or cut and paste. I therefore wrote them down and they are now available for download here.

I also included the compiled C Program including the source code.

Although I tested it, I cannot be made responsible for any kind of data loss resulting from executing posted code/applications.

Have Fun