Avoid visible window with IEAction

I am having a hard time hiding the new window it creates _IEAction($oIE_Input, "click")

. Code:

$oIE = _IECreate("mypage")
Sleep(20000)
$oIE_Input= _IEGetObjById($oIE, "the button")
_IEAction($oIE_Input, "click")
Sleep(20000)
_IEQuit($oIE)

      

Clicking the Internet Explorer button opens a new visible window. How can I avoid or hide the opening of new windows?

+3


source to share


1 answer


Perhaps you can run your entire IE session in the background. Take a look at the _IECreate parameters.

Browser window is hidden



$sUrl [optional] specifies the Url to navigate to upon creation 
$iTryAttach [optional] specifies whether to try to attach to an existing window
    0 = (Default) do not try to attach
    1 = Try to attach to an existing window 
$iVisible [optional] specifies whether the browser window will be visible
    0 = Browser Window is hidden
    1 = (Default) Browser Window is visible 
$iWait [optional] specifies whether to wait for page to load before returning
    0 = Return immediately, not waiting for page to load
    1 = (Default) Wait for page load to complete before returning 
$iTakeFocus [optional] specifies whether to bring the attached window to focus
    0 = Do not bring window into focus
    1 = (Default) bring window into focus 

      

-1


source







All Articles