SEARCH
TOOLBOX
LANGUAGES
modified on 19 June 2010 at 01:28 ••• 2,259 views

O2 Script/View Details of current Internet Explorer instances

From

Jump to: navigation, search

this script will open a new window containing a table with a number of details from the currently loaded Internet Explorer instances:

screenshots

  • open O2 Simple Script Editor
  • paste the code included below

Image:5_26_2010_12_11_15_AM_tmp2222.jpg

  • click on Execute and see current IE instances details:

Image:5_26_2010_12_12_56_AM_tmp2225.jpg

Image:5_26_2010_12_12_18_AM_tmp2224.jpg


source code

var topPanel = O2Gui.open<Panel>("Details of running instances of Internet Explorer", 800,200);					
			`		
var tableList = topPanel.add_TableList("IE details");    
 
var refreshLink = tableList.add_Link("refresh", 2,100, 
	()=> {
			tableList.clearTable();  
			tableList.add_Columns("Document Type Name", "FullName",  "Visible", "LocationName","LocationURL",
								 "MenuBar", "Name", "Offline", "Parent", "Path", "ReadyState", "Silent",
					 			 "TopLevelContainer","Height","Left",  "Top", "Width");
 
			ShellWindows windows = new ShellWindowsClass(); 
 
			"there are {0} instances of IE".info(windows.Count);
 
			for(int i = 0 ; i < windows.Count ; i++)
			{
				if (windows.Item(0) is InternetExplorer)
				{ 
					var internetExplorer = (InternetExplorer)windows.Item(i);
 
					tableList.add_Row(internetExplorer.Document.comTypeName(),
									 internetExplorer.FullName.str(),
									 internetExplorer.Visible.str(),
									 internetExplorer.LocationName,
									 internetExplorer.LocationURL,
									 internetExplorer.MenuBar.str(),
									 internetExplorer.Name,
									 internetExplorer.Offline.str(),
									 internetExplorer.Parent.comTypeName(),
									 internetExplorer.Path,
									 internetExplorer.ReadyState.str(),
									 internetExplorer.Silent.str(),						 
									 internetExplorer.TopLevelContainer.str(),
									 internetExplorer.Height.str(),
									 internetExplorer.Left.str(),  
									 internetExplorer.Top.str(), 
									 internetExplorer.Width.str());
				}		
			}
			tableList.makeColumnWidthMatchCellWidth();
		});
 
refreshLink.click();		
 
//using SHDocVw
//O2Ref:Interop.SHDocVw.dll
//O2Ref:System.Data.dll
MediaWiki Appliance - Powered by TurnKey Linux