Jump to content
ssah8

New Window | Browser

Recommended Posts

ssah8

I can't figure this out.

If I have a browser open, and I make the browser click on a button that opens up a new browser window. How can I make the following code to apply to the second window that popped up?

My code is still applying to the previous window (which I don't want to close)

Case $start
               _IENavigate($oIE, "http://google.com")
               sleep(5000)
               For $i = 1 To $repeat1

                  Local $oInputs = _IETagNameGetCollection($oIE, "button")
                  For $oInput In $oInputs
                     If $oInput.classname == "button blue" Then _IEAction($oInput, "click")

                  Next

                  Sleep(3000)

                  WinActivate("YouTube - Internet Explorer")
                  Local $oInputs = _IETagNameGetCollection($oIE, "button")
                  For $oInput In $oInputs
                     If $oInput.classname == "yt-uix-button yt-uix-button-size-default yt-uix-button-opacity yt-uix-button-has-icon no-icon-markup like-button-renderer-like-button like-button-renderer-like-button-clicked yt-uix-button-toggled yt-uix-post-anchor yt-uix-tooltip" Then _IEAction($oInput, "click")
                  Next

               Next

I changed some links, but the main thing here is how to apply the next code to the new window (YouTube)

Share this post


Link to post
Share on other sites
j0kky

You should retrieve href url and create new windows through

_IECreate()

instead of clicking on buttons.

If you want to follow your way, you can get new window object through

_IEAttach()

 

Edited by j0kky

Share this post


Link to post
Share on other sites
ssah8

Im quiet new to AutoIT, I think I get what you are saying. Would you mind giving me a small example? I would really appriciate it.

Share this post


Link to post
Share on other sites
ssah8

Im not. I quitted that project. Now Im just trying to learn AutoIT.

Share this post


Link to post
Share on other sites
Jos

seriously ...  just learning?

Not convinced ...  and better not try this again.
Maybe they have better support, but seems your are burning credit there as well.

*click*

Jos

Edited by Jos
  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×