A: |
this function closes all browsers open at the time of running, irrespective of their titles and window positions and so on... kill them. (KB 4578)
public function close_browsers()
{
auto rc;
auto windir = getenv ("windir");
auto app = sprintf ("%sSystem32Taskmgr.exe", windir);
auto taskwarn = "{class: window, label: "Task Manager Warning", MSW_class:"#32770"}";
auto taskmgr = "{class: window, label: "Windows Task Manager", MSW_class:"#32770"}";
auto listwin = "{class: window, label: "noname (page)", MSW_class:"#32770"}";
auto list = "{class: list, parent: "{class: window, label: "noname(page)", MSW_class: "#32770"}"}";
auto endprocbtn = "{class: push_button, label: "End Process", parent:"{class: window, label: "noname (page)", MSW_class: "#32770"}"}";
auto yesbtn = "{class: push_button, label: "Yes", parent: "{class: window,label: "Task Manager Warning", MSW_class: "#32770"}"}";
auto win2 = "{class: window,MSW_class: IEFrame,location: 0}";
auto win1 = "{class: window,MSW_class: browser_main_window,location: 0}";
while (win_exists (win1) == E_OK)
win_close (win1);
while (win_exists (win2) == E_OK)
rc = win_close (win2);
}
|