Skip to main content

Posts

Showing posts from October, 2008

ExpandAllMenusFor Notepad

'=================================================================================== 'Function Name :ExpandAllMenusFor Notepad ' Created By :Jai ' Description : Expand all menuitems in the Notepad ' Created : Oct-16- 08 '=================================================================================== Function ExpandAllMenus() Window("regexpwndtitle:= Notepad").Activate With Window("regexpwndtitle:= Notepad").WinMenu("Menuobjtype:= 2") nTopMenuCount = .GetItemProperty("", "SubMenuCount") For i = 1 To nTopMenuCount sTopItemPath = .BuildMenuPath("", i) sTopItemLabel = .GetItemProperty(sTopItemPath, "Label") sReport = sReport + sTopItemLabel + vbNewLine bHasSubMenu = .GetItemProperty(sTopItemPath, "HasSubMenu") If bHasSubMenu Then

Invoke Browser

'=================================================================================== 'Function Name : Invoke Browser ' Created By :Jai ' Description : invoke the browser specified and close all the existing browsers 'Parameters :Url,Broser Type(IE,FF) ' Created : Oct 16 08 '=================================================================================== 'Notes : If not specified the browser type Netscape...will be Invoke '=================================================================================== Function InvokeBrowser (sURL, sBrowser) SystemUtil.CloseProcessByName("iexplore.exe") wait 0,500 SystemUtil.CloseProcessByName("firefox.exe") wait 0,500 SystemUtil.CloseProcessByName("netscp6.exe") wait 0,500 If UCase(sBrowser) = "IE" Then SystemUtil.Run "iexplore.exe", sURL wait 2 Window("