Javier Posted April 21, 2011 Posted April 21, 2011 Hi All,What I'm trying to achieve is to force a IE window to close even when IE its processing an online task. This is the code provided by Richard (thanks!!). The program works ok when no process is running on IE website, but nothing happens when IE its running a task. I'm getting this pop-up message saying:Thanks in advance
martin Posted April 21, 2011 Posted April 21, 2011 Hi All,What I'm trying to achieve is to force a IE window to close even when IE its processing an online task. This is the code provided by Richard (thanks!!). The program works ok when no process is running on IE website, but nothing happens when IE its running a task. I'm getting this pop-up message saying:Thanks in advanceFor me the image you give covers the code, or at least I assume there is code underneath. Maybe you could edit your post. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Javier Posted April 21, 2011 Author Posted April 21, 2011 The code Opt("WinTitleMatchMode", 2) $windows = WinList("WebHotelEXPERT 6.0 -") For $i = 1 to $windows[0][0] WinClose($windows[$i][1]) ; I changed to winkill (same results) Next
Javier Posted April 21, 2011 Author Posted April 21, 2011 Hey Martin, Thanks for your quick reply. Actually the code works well without issues. The problem appears when the webpage is doing a process, so winkill() looks like its not closing the IE windows at this specific time. Thanks
kaotkbliss Posted April 22, 2011 Posted April 22, 2011 Will you have more than 1 instance of IE open? if not, you could use ProcessClose() which should end it reguardless of what it is doing. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
jamesstp20 Posted April 22, 2011 Posted April 22, 2011 Will you have more than 1 instance of IE open? if not, you could use ProcessClose() which should end it reguardless of what it is doing.Or he's having 5 IE open than he can also For $i = 1 to 5ProcessClose("iexplore.exe")Next
Javier Posted April 22, 2011 Author Posted April 22, 2011 Thanks Guys, The problem is only 1 IE windows (8 in total) is constantly reading info from server. So only this webpage is not closing with winkill or winclose commands. I could use ProcesClose() and will works ok, as you guys recommended, but in this way APPEON Server (SQL Anywhere) will leave session opens. The main reason of this program is to close this sessions from the server. There's any parameter for winclose() or winkill() to fully force the windows to close? Again guys, thanks for your help
kaotkbliss Posted April 22, 2011 Posted April 22, 2011 I was asking because if he has more than 1 open but only wants to close the one, then ProcessClose would be a bit more difficult to work with 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
brandonms Posted April 22, 2011 Posted April 22, 2011 $PID = WinGetProcess("Google - Windows Internet Explorer") ProcessClose($PID) -or- ProcessClose(WinGetProcess("Google - Windows Internet Explorer")) -or- #include <IE.au3> $oIE = _IECreate(www.google.com) DoStuff() _IEClose($oIE)
Javier Posted April 23, 2011 Author Posted April 23, 2011 Hi Brandonms, One of the problems is that I can't use ProcessClose() command because my session is not closing from my server. To make the long history short, I paste below a link from our website so you can get a general idea what is this all about it. Basically, is an application running inside of IE and when this app is busy there's no way to close it, or stop it or KILL IT!!! What I'm trying to do now is to use winkill() and few parameters, but doesn't work. I am almost giving it up! Link to webpage http://img130.imageshack.us/img130/4394/samplebq.png Anyways, big thanks for the code (Actually works like a charm!!!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now