SetMachine makes Machine the current machine. You can obtain the handle of a machine by calling Connect or GetMachine. Machine may also be a string representing the machine name, as specified in the SetupMachine function.
Calls to the 4Test agent will be made on the machine on which the script is running.
[-] testcase SetMachineExample ()
[ ] HMACHINE target_machine // target computer
[ ] HMACHINE host_machine // host computer
[ ] host_machine = GetMachine () // save host's handle
[ ] // save target's handle
[ ] target_machine = Connect ("sunfish")
[ ] // what is currently active on target machine?
[ ] Print ("Active on Target: ", Desktop.GetActive ())
[ ] // what is currently active on host machine?
[ ] SetMachine (host_machine)
[ ] Print ("Active on Host: ", Desktop.GetActive ())