iamtech Posted March 30, 2018 Share Posted March 30, 2018 its possible control multiple tab using one script ? i want to do same process for multiple tab. Link to comment Share on other sites More sharing options...
iamtech Posted March 30, 2018 Author Share Posted March 30, 2018 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 More sharing options...
Moderators Melba23 Posted March 30, 2018 Moderators Share Posted March 30, 2018 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
iamtech Posted March 30, 2018 Author Share Posted March 30, 2018 17 minutes ago, Melba23 said: iamtech, Stick to just the one thread please. M23 Sorry @Melba23 Link to comment Share on other sites More sharing options...
Danp2 Posted March 30, 2018 Share Posted March 30, 2018 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") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
iamtech Posted March 30, 2018 Author Share Posted March 30, 2018 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 More sharing options...
Danp2 Posted March 30, 2018 Share Posted March 30, 2018 It depends. How were the tabs created in the first place? How did you navigate to the site? Etc. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
iamtech Posted March 30, 2018 Author Share Posted March 30, 2018 (edited) 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 March 30, 2018 by iamtech Link to comment Share on other sites More sharing options...
iamtech Posted March 30, 2018 Author Share Posted March 30, 2018 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 More sharing options...
iamtech Posted March 30, 2018 Author Share Posted March 30, 2018 @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 More sharing options...
Danp2 Posted March 30, 2018 Share Posted March 30, 2018 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
iamtech Posted March 31, 2018 Author Share Posted March 31, 2018 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 Link to comment Share on other sites More sharing options...
Danp2 Posted March 31, 2018 Share Posted March 31, 2018 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
iamtech Posted March 31, 2018 Author Share Posted March 31, 2018 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 More sharing options...
iamtech Posted March 31, 2018 Author Share Posted March 31, 2018 @Danp2 its possible attach IE tab using ClassNN or Advanced mode ? Link to comment Share on other sites More sharing options...
Danp2 Posted March 31, 2018 Share Posted March 31, 2018 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Danp2 Posted March 31, 2018 Share Posted March 31, 2018 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. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
iamtech Posted March 31, 2018 Author Share Posted March 31, 2018 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 Link to comment Share on other sites More sharing options...
iamtech Posted March 31, 2018 Author Share Posted March 31, 2018 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 ? Link to comment Share on other sites More sharing options...
Danp2 Posted March 31, 2018 Share Posted March 31, 2018 @iamtech Stop being lazy. Read the help file. Look at the examples, which clearly show how to do this. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now