Jump to content

Recommended Posts

Posted

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)

Posted (edited)

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
Posted

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.

  • Developers
Posted (edited)

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Jos locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...