SetGuiType Function


Tells 4Test to ignore the agent report of the actual GUI residing on the specified machine and instead to execute the test case as if the machine was running the specified GUI.

To execute a statement, the statement must be compiled. In order to compile statements for a GUI type other than the GUI type of the host machine, you should enable networking through the Network text box in the Runtime Options dialog box. Keep the Gui Targets text box empty so that all statements are compiled. Only the statements for the GUI type set by SetGuiType() are executed.


SetGuiType (gGuiType [, hMachine])
Variable Description
gGuiType The GUI type that 4Test should use. GUITYPE.
hMachine Optional: A handle to the machine to be set. If you omit this parameter, the substitute GUI will be used on the current machine. HANDLE.


Establishing a substitute GUI for a machine affects the tags that are used and the selection of commands that are conditionalized on the GUI type.

GetGuiType() returns the GUI type specified in the last SetGuiType() call. If there was no call to SetGuiType(), then GetGuiType() returns the actual GUI type of the Agent machine.


	[ ] GUITYPE gtype = GetGuiType ()
	[-] if (gtype == msw2003)
		[ ] SetGuiType (mswxp)