Automatically executing actions according to the current location I would like to have in my MacBook Pro a functionality which execute automatically some actions according to my current location. This actions could be for example


Change the default printer
Change the network location (for setting for example static or dynamic IP like in this question)
Open an application or a specific file
Activate/Deactive file sharing
Run shell scripts


The current location could be inferred for example by using the current network (Wi-Fi network name) or other localization services.

Is there an application that provides this functionality?
You probably want Control Plane:


  ControlPlane allows you to build configuration profiles, contexts in ControlPlane lingo, for your Mac based on where you are or what you are doing.  ControlPlane determines where you are or what you are doing based on a number of available evidence sources and then automatically reconfigures your Mac based on your preferences.  Evidence sources can include your current location, visible WiFi networks, attached USB devices, running applications and more.  You can even write your own evidence sources using shell scripts!