Makes the specified machine the current machine.
|Machine||A handle to the machine to be set as the current machine. HMACHINE or STRING.|
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 ())