Phantom Documentation

[Help Home] [Phantom Home]
MainWin

window window.MainWin(int,string)

Applicable Classes: All

Return Type:
window
Parameters: int iTag, string sClass

window window.MainWin(string,string)

Applicable Classes: All

Return Type:
window
Parameters: string sTag, string sClass


Description:
This function is used as a generic declaration for a child window of the calling window. The function creates and returns a child window variable with the tag 'sTag' (or iTag if it is a numeric tag) and the class 'sClass'. A window function can then be called on the new window. This function is often used in recorded scripts. See Generic Windows for more information on what iTag, sTag, and sClass are.

Example Code

use "PhantomTarget.dec";
System("PhantomTarget.exe");

# Use window declarations and MainWin to create
# The child window variable
window w = PhantomTarget.MDIClient1.MainWin("Untitled", "Afx*");

# Call a function on the new child window
w.Minimize();
Sleep(1);

# Call a function in-line on the MainWin declaration
PhantomTarget.MDIClient1.MainWin("Untitled", "Afx*").Restore();

# Exit out
PhantomTarget.Close();


See Also: Generic Windows, MainWin


Copyright 2000-2011 Phantom Automated Solutions