Photoactivated Artificial Molecular Machines that Can Perform Tasks