Jump to content
iamtech

Control Multiple IE tab at Once

Recommended Posts

iamtech

its possible control multiple tab using one script ?

i want to do same process for multiple tab.

Share this post


Link to post
Share on other sites
Melba23

iamtech,

Stick to just the one thread please.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
iamtech
17 minutes ago, Melba23 said:

iamtech,

Stick to just the one thread please.

M23

Sorry @Melba23

Share this post


Link to post
Share on other sites
Danp2

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")

 

Share this post


Link to post
Share on other sites
iamtech
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 ?

Share this post


Link to post
Share on other sites
iamtech
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

Share this post


Link to post
Share on other sites
iamtech
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

Share this post


Link to post
Share on other sites
iamtech

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

Share this post


Link to post
Share on other sites
iamtech
20 hours ago, Danp2 said:

You can't expect us to write the script for you. And telling us "not working" isn't helping because you aren't providing any useful feedback.

Sorry but please help me @Danp2

Share this post


Link to post
Share on other sites
Danp2

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.

Share this post


Link to post
Share on other sites
iamtech
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

Share this post


Link to post
Share on other sites
iamtech

@Danp2

its possible attach IE tab using ClassNN or Advanced mode ?

Share this post


Link to post
Share on other sites
Danp2
5 minutes ago, iamtech said:

its possible attach IE tab using ClassNN or Advanced mode ?

I don't believe so, but you could use the optional $iInstance parameter to select a different matching instance.

Share this post


Link to post
Share on other sites
Danp2
9 minutes ago, iamtech said:

it was only control first tab

__IENavigate doesn't return a reference to the new tab. You will need to use _IEAttach to obtain the object reference.

Share this post


Link to post
Share on other sites
iamtech
2 minutes ago, Danp2 said:

I don't believe so, but you could use the optional $iInstance parameter to select a different matching instance.

How to use it, please help me i am new for autoit

Share this post


Link to post
Share on other sites
iamtech
Just now, Danp2 said:

__IENavigate doesn't return a reference to the new tab. You will need to use _IEAttach to obtain the object reference.

@Danp2

But, How can i use _ieattach if multiple tab have same url ?

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

×

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.