Jump to content

Internet Explorer


Recommended Posts

Hello,

 

I'm trying to create code that will open multiple tabs in one Ie Session and then only refresh one of those tabs

with out moving off the current active tab and not refreshing the other tabs.

There  will be multiple tabs with the same url.

I can easily open the multiple tabs , its the doing the refresh on the 1 tab and not effecting the others that's

the challenge I cant seem to resolve

#include <IE.au3>


 ; Opens IE with three tabs
    Local $oIE1 = _IECreate("www.google.com")
    _IELoadWait($oIE1)
    Local $hwndIE1 = _IEPropertyGet($oIE1, "hwnd")

    __IENavigate($oIE1, "http://www.google.com", 0, 0x800)
    _IELoadWait($oIE1)

  __IENavigate($oIE1, "http://autoitscript.com", 0, 0x800)
    _IELoadWait($oIE1)

Please note I do not want to add an plugin extension Any ideas what I should try ?

Edited by HighlanderSword
Link to comment
Share on other sites

You need to attach each tab to an object variable like this :

#include <Array.au3>
#include <IE.au3>

Opt("MustDeclareVars", 1)

Global Const $IE_NEW_TAB = 0x0800

Local $oIE1 = _IECreate("www.google.com")
Local $oIE2 = _IECreateTab($oIE1, "ca.yahoo.com")
Local $oIE3 = _IECreateTab($oIE1, "www.autoitscript.com")
Local $oIE4 = _IECreateTab($oIE1, "www.google.com", 2)

Local $arr = WinList("[REGEXPTITLE:(?i)(.*Internet Explorer.*)]")
_ArrayDisplay($arr)

_IEQuit($oIE4)
_IEQuit($oIE3)
_IEQuit($oIE2)
_IEQuit($oIE1)

Func _IECreateTab(ByRef $oIE, $url, $instance = 1)
  Local $Count = 0, $oIE2

  $oIE.Navigate($url, $IE_NEW_TAB)

  While 1
    $oIE2 = _IEAttach($url, "url", $instance)
    If IsObj($oIE2) Then ExitLoop
    $Count += 1
    If $Count > 100 Then Exit MsgBox(0, "Error", "Load expired")
    Sleep(50)
  WEnd

  _IELoadWait($oIE2, 300)

  Return $oIE2

EndFunc   ;==>_IECreateTab

 

 

Link to comment
Share on other sites

  • Moderators

@makemoneyonl if you have something to contribute, please do so in the thread.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

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