_IEQuit
Close the browser and remove the object reference to it.
#include <IE.au3>
_IEQuit(ByRef $o_object)
Параметры
$o_object | Переменная объекта InternetExplorer.Application |
Возвращаемое значение
Успех: | Возвращает 1 |
Ошибка: | Возвращает 0 и устанавливает @error |
@error: | 0 ($_IEStatus_Success) = Нет ошибок |
3 ($_IEStatus_InvalidDataType) = Неверный тип данных | |
4 ($_IEStatus_InvalidObjectType) = Неверный тип объекта | |
@extended: | Содержит номер неверного параметра |
Примечания
_IEQuit is particularly important when creating or working with invisible instances of Internet Explorer. When AutoIt exits when working with visible instances of a browser, the browser continues to run and the visible window is left for the user to manage. When the browser instance is invisible however, when AutoIt exits the browser process is left running and there is no user interface to interact with and an orphan Iexplore.exe process is left running on the system. It is therefore good practice to call _IEQuit whenever the browser process is not needed after the script exists.См. также
_IEAttach, _IECreateПример
; *******************************************************
; Пример 1 - Create an invisible browser window, navigate to a
; website, retrieve some information and Quit
; *******************************************************
#include <IE.au3>
$oIE = _IECreate ("http://sourceforge.net", 0, 0)
; Display the innerText on an element on the page with a name of "sfmarquee"
$oMarquee = _IEGetObjByName ($oIE, "sfmarquee")
MsgBox(4096, "SourceForge Information", $oMarquee.innerText)
_IEQuit ($oIE)