What you want is already easily achievable with scripts.