Phantom Documentation

[Help Home] [Phantom Home]
MainWin

window MainWin(string,string)

Return Type: window
Parameters: string sTag, string sTag

window MainWin(int,string)

Return Type: window
Parameters: int iTag, string sTag

Description:
This function constructs and returns a window with the tag and class from sTag and sClass, respectively. This integer version (with iTag) of MainWin is used for windows with no text tag. The iTag parameter indicates the number of sibling windows prior to this window that have the same class as sClass. See 'Window Declarations' for more information on the sTag, iTag, and sClass parameters.

Example Code
1 >>System("c:\\windows\\system32\\notepad.exe");
2 >>window w = MainWin("*", "Notepad");
3 >>window x = MainWin(1, "Notepad"); # 1st Notepad window
4 >>disp(Exists(w));
true
5 >>disp(Exists(x));
true
6 >>w.SetActive();
7 >>w.Close();


 


Copyright 2000-2011 Phantom Automated Solutions