Jump to content

Control Multiple IE tab at Once


Recommended Posts

I want to open multiple webpage with same url and apply this code for all tab at once :

IELoadWait($oIE)
$consent = _IEGetObjById($oIE,"consent")
_IEAction($consent,"click")
_IELoadWait($oIE)

$img1 = _IEGetObjById($oIE,"img1")
_IEAction($img1,"click")

Its possible ??

Link to comment
Share on other sites

  • Moderators

iamtech,

Stick to just the one thread please.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Yes, it's possible to control multiple tabs. There isn't a simple way to execute the script simultaneously on both tabs. However, you could do something like this --

$oIE1 = _IEAttach(<site 1>)
$oIE2 = _IEAttach(<site 2>)

$consent = _IEGetObjById($oIE1,"consent")
_IEAction($consent,"click")

$consent = _IEGetObjById($oIE2,"consent")
_IEAction($consent,"click")

_IELoadWait($oIE1)
_IELoadWait($oIE2)

$img1 = _IEGetObjById($oIE1,"img1")
$img2 = _IEGetObjById($oIE2,"img1")

_IEAction($img1,"click")
_IEAction($img2,"click")

 

Link to comment
Share on other sites

2 hours ago, Danp2 said:

Yes, it's possible to control multiple tabs. There isn't a simple way to execute the script simultaneously on both tabs. However, you could do something like this --

$oIE1 = _IEAttach(<site 1>)
$oIE2 = _IEAttach(<site 2>)

$consent = _IEGetObjById($oIE1,"consent")
_IEAction($consent,"click")

$consent = _IEGetObjById($oIE2,"consent")
_IEAction($consent,"click")

_IELoadWait($oIE1)
_IELoadWait($oIE2)

$img1 = _IEGetObjById($oIE1,"img1")
$img2 = _IEGetObjById($oIE2,"img1")

_IEAction($img1,"click")
_IEAction($img2,"click")

 

@Danp2

How to use this code if site 1 & site 2 = same value, i means how it working on duplicate site ?

Link to comment
Share on other sites

8 minutes ago, Danp2 said:

It depends. How were the tabs created in the first place? How did you navigate to the site? Etc.

@Danp2

I.e. i want to create 3 tab with www.google.com and search text at once on 3 created tab ?

Edited by iamtech
Link to comment
Share on other sites

9 minutes ago, Danp2 said:

It depends. How were the tabs created in the first place? How did you navigate to the site? Etc.

 

14 minutes ago, iamtech said:

@Danp2

How to use this code if site 1 & site 2 = same value, i means how it working on duplicate site ?

not working

Link to comment
Share on other sites

@Danp2

I am trying with this code : 

#include <IE.au3>
$oIE = _IEAttach ("Google")
Local $oIE1 =__IENavigate($oIE, "https://www.google.co.in", 0, 0x800)
Local $oIE2 =__IENavigate($oIE, "https://www.google.co.in", 0, 0x800)

_IELoadWait($oIE2)
$oObj = _IEGetObjByName($oIE1,"q")
_IEPropertySet($oObj,"innertext", 'autoit')

$oObj = _IEGetObjByName($oIE2,"q")
_IEPropertySet($oObj,"innertext", 'autoit')

But, Not working.

Link to comment
Share on other sites

20 minutes ago, Danp2 said:

When you're asking for help, try making it easier for others to assist you by providing useful feedback.  I shouldn't need to run your script (which isn't runnable as-is, BTW) to determine what actually isn't working.

Hint: Try calling _IEFormElementSetValue instead of _IEPropertySet.

it was only control first tab

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...