Jump to content
Sign in to follow this  
ROnaldo30

Make invisible new window

Recommended Posts

ROnaldo30

I have a link that opens in a new window type:

<a href="link" target="_new"> test </ a>

To click can use only:

_IEAction($oLink, "click")

_IELoadWait ($oIE)

How can I make new invisible window that opens and closes like a can?

Share this post


Link to post
Share on other sites
bogQ

How can I make new invisible window that opens and closes like a can?

I dont complitley understand what r you truying to say or do.

See if something from this can help

WinSetTrans
GUISetState 
WinSetState

_IECreate
$f_visible Optional: specifies whether the browser window will be visible
0 = Browser Window is hidden
1 = (Default) Browser Window is visible

or try to explaind better what r you trying to do.


TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 

Share this post


Link to post
Share on other sites
ROnaldo30

I have a link in a page of the type:

<a href="link" target="_new"> test </ a>

$oLinks = _IELinkGetCollection ($oIE)

For $oLink In $oLinks

....

_IEAction($oLink, "click")

I want to click this link with: _IEAction($oLink, "click")

Because the link has: target="_new " when i click it opens in a new window.

I'd like that the new window to be invisible.

Thanks!

Share this post


Link to post
Share on other sites
CodyBarrett

Winsetstate ($hWnd, @SW_HIDE) (or however the order it goes)

would that work?

Share this post


Link to post
Share on other sites
ROnaldo30

Winsetstate ($hWnd, @SW_HIDE) (or however the order it goes)

would that work?

I am use:

WinSetState("[CLASS:IEFrame]", @SW_HIDE)

but it is visible a few seconds and then becomes invisible.

how can I do to not be visible at all?

Share this post


Link to post
Share on other sites
oMBRa

tell us the page with your link

Share this post


Link to post
Share on other sites
ROnaldo30

tell us the page with your link

#include <IE.au3>

$key = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows", "PopupMgr")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows", "PopupMgr", "REG_SZ", "no")
$oIE = _IECreate ("http://www.popuptest.com", 0 , 0, 1, 0)
_IELoadWait($oIE)
$oInputs = _IELinkGetCollection ($oIE)
For $oInput In $oInputs         
    If $oInput.href = "http://www.popuptest.com/popuptest1.html" Then       
        _IEAction ($oInput, "click")
        _IELoadWait($oIE)
        ExitLoop
    EndIf
Next
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows", "PopupMgr", "REG_SZ", $key)

How make popup (new window) invisible ?

Edited by ROnaldo30

Share this post


Link to post
Share on other sites
CodyBarrett

straight from the helpfile (has been mentioned above)

_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )

Share this post


Link to post
Share on other sites
ROnaldo30

straight from the helpfile (has been mentioned above)

_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )

New window is created on: _IEAction ($oInput, "click"). This I want to be invisible.

Share this post


Link to post
Share on other sites
CodyBarrett

winwaitactive () ? then winsetstate() to hide it? im not sure of anything else that would do what you want

Share this post


Link to post
Share on other sites
Richard Robertson

If the link is javascript, there's nothing you can do. You just have to hide it when it appears.

If it's not javascript, you can just read the link and make a new window from that link.

Share this post


Link to post
Share on other sites
ROnaldo30

If the link is javascript, there's nothing you can do. You just have to hide it when it appears.

If it's not javascript, you can just read the link and make a new window from that link.

Hi,

I add the file with a script "test.au3".

I want to make "newWindow2 " invisible.

How can I do it, please modify my script.

Thx!

test.zip

Share this post


Link to post
Share on other sites
Richard Robertson

I'm not going to bother reading through all that to figure out what needs to be changed. You need to.

When posting code, only post the pieces that are relevant to the problem.

Share this post


Link to post
Share on other sites
ROnaldo30

If the link is javascript, there's nothing you can do. You just have to hide it when it appears.

If it's not javascript, you can just read the link and make a new window from that link.

#include <IE.au3>

$key = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows", "PopupMgr")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows", "PopupMgr", "REG_SZ", "no")
$oIE = _IECreate (@ScriptDir & "\" & "initialwindow.html", 0, 0)
_IELoadWait($oIE)
$oInputs = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
For $oInput In $oInputs         
    If StringInStr($oInput.href, "newWindow2.html") Then                
        _IEAction ($oInput, "click")
        _IELoadWait($oIE)
        ExitLoop
    EndIf
Next
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\New Windows", "PopupMgr", "REG_SZ", $key)

In html:

<html>
<form>
<a href="newWindow1.html">newWindow1</a>
<br>
<a href="newWindow2.html" target="_new"">newWindow2</a>
<br>
<a href="newWindow3.html">newWindow3</a>
<br>
</form>
</html>

How make newWindow2 invisible, with _IEAction ($oInput, "click").

I don't use _IENavigate because i want simulate click.

Thx!

Share this post


Link to post
Share on other sites
Richard Robertson

Why do you want to simulate click?

Share this post


Link to post
Share on other sites
ROnaldo30

Why do you want to simulate click?

With _IEAction ($oInput, "click").

Share this post


Link to post
Share on other sites
Richard Robertson

Read my question again. I asked why, not how.

Share this post


Link to post
Share on other sites
ROnaldo30

Read my question again. I asked why, not how.

Thanks for reply,

I work in web testing products, and simulation of clicks is important for voting and for the number of downloads.

Share this post


Link to post
Share on other sites
Richard Robertson

If you are supposed to be testing it, why are you hiding it?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.