def bringToFront(self): """ Bring the VM window to front. """ if self.status() == Node.started: # try 2 different window title formats bring_window_to_front_from_process_name("VirtualBox.exe", title="{} [".format(self._settings["vmname"])) bring_window_to_front_from_process_name("VirtualBox.exe", title="{} (".format(self._settings["vmname"])) # bring any console to front return Node.bringToFront(self)
def bringToFront(self): """ Bring the VM window to front. """ if self.status() == Node.started: # try 2 different window title formats bring_window_to_front_from_process_name( "VirtualBox.exe", title="{} [".format(self._settings["vmname"])) bring_window_to_front_from_process_name( "VirtualBox.exe", title="{} (".format(self._settings["vmname"])) # bring any console to front return Node.bringToFront(self)
def bringToFront(self): """ Bring the VM window to front. """ if self.status() == Node.started: try: vmx_pairs = self.module().parseVMwareFile(self.settings()["vmx_path"]) except OSError as e: log.debug("Could not read VMX file: {}".format(e)) return if "displayname" in vmx_pairs: window_name = "{} -".format(vmx_pairs["displayname"]) # try for both VMware Player and Workstation bring_window_to_front_from_process_name("vmplayer.exe", title=window_name) bring_window_to_front_from_process_name("vmware.exe", title=window_name) # bring any console to front return Node.bringToFront(self)
def bringToFront(self): """ Bring the VM window to front. """ if self.status() == Node.started: try: vmx_pairs = self.module().parseVMwareFile( self.settings()["vmx_path"]) except OSError as e: log.debug("Could not read VMX file: {}".format(e)) return if "displayname" in vmx_pairs: window_name = "{} -".format(vmx_pairs["displayname"]) # try for both VMware Player and Workstation bring_window_to_front_from_process_name("vmplayer.exe", title=window_name) bring_window_to_front_from_process_name("vmware.exe", title=window_name) # bring any console to front return Node.bringToFront(self)