tve automation code