DjDeep00 Posted July 12, 2006 Share Posted July 12, 2006 I am trying to have like 10 IE windows open and send different clicks on each of the windows at the same time. I am trying to use IE.au3 udfs but it doesnt like sending more then one ie window at a time. Someone please advise. Link to comment Share on other sites More sharing options...
DaleHohm Posted July 12, 2006 Share Posted July 12, 2006 I am trying to have like 10 IE windows open and send different clicks on each of the windows at the same time. I am trying to use IE.au3 udfs but it doesnt like sending more then one ie window at a time. Someone please advise.Just set up multiple object variables... $oIE1 = _IECreate("http://url1") $oIE2 = _IECreate("http://url2") $oIE3 = _IECreate("http://url3") Then use $oIE1|2|3 as input to all of the other functions. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
BabyBeast Posted July 12, 2006 Share Posted July 12, 2006 you can have different obj ref to each of them so I don't see any problem of sending click to different ie browser. Link to comment Share on other sites More sharing options...
jvanegmond Posted July 12, 2006 Share Posted July 12, 2006 (edited) I think using arrays is the better solution, but that depends on personal taste. This has a drawback that you can only do 1 url, but with 10 windows.. I think that's what you want. For $x=0 to 3 $oIE[$x] = _IECreate("http://url") Next Edited July 12, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 12, 2006 Moderators Share Posted July 12, 2006 I am trying to have like 10 IE windows open and send different clicks on each of the windows at the same time. I am trying to use IE.au3 udfs but it doesnt like sending more then one ie window at a time. Someone please advise.If it needs to be at the exact same time then you would need 10 scripts running. However, if it can be one after the other, then all you need to do is assign a variable to each window. Link to comment Share on other sites More sharing options...
jvanegmond Posted July 12, 2006 Share Posted July 12, 2006 (edited) If it needs to be at the exact same time then you would need 10 scripts running. However, if it can be one after the other, then all you need to do is assign a variable to each window.That's a cool idea. To make them go at exactly the same time, i would create a script that has 10 run commands to the same script. And then a RegWrite(something, 1) (1 being value).The scripts that are being run would start likeWhile Not RegRead(something)WendYea, awesome Edited July 12, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 What would I need to change in the following functions: Func Load_Test () $var = IniReadSection($File, "LNP") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Return 0 EndIf For $i = 1 To $var[0][0] ;MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1]) $oMyError = ObjEvent ("AutoIt.Error", "MyErrFunc") Global $Title=$var[$i][0] Global $oIE = _IECreate () _IELoadWait($oIE,10) _IENavigate ($oIE, IniRead($File,"URLs","LNP","https://lnp-uat.activationnow.com/lnp/jsp/logon/login.jsp")) $PasswordName = "j_password" $o_form = _IEFormGetObjByIndex($oIE, 0) $o_login = _IEFormElementGetObjByName ($o_form, "j_username") $o_password = _IEFormElementGetObjByName ($o_form, $PasswordName) _IEFormElementSetValue ($o_login, $var[$i][0]) _IEFormElementSetValue ($o_password, $var[$i][1]) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "login") $oSubmitButton.Click WinWaitActive("Local Number Portability - HOME - Microsoft Internet Explorer","",5) WinSetTitle("Local Number Portability - HOME - Microsoft Internet Explorer","",$Title) WinSetState($Title,"",@SW_MAXIMIZE) For $c=1 to 500 Cycle () Next Sleep(1000) _IEClickLinkByText($oIE, "LOGOFF") Sleep(1000) WinClose("LNP Manager Login Screen - Microsoft Internet Explorer","") Sleep(1500) Next EndFunc Func Cycle () _IENavigate ($oIE,"https://lnp-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") _IELoadWait($oIE,10) $oTable2 = _IETableGetCollection ($oIE) ;WinSetState("Local Number Portability - HOME - Microsoft Internet Explorer","",@SW_DISABLE) FileDelete("C:\Table.txt") $x=0 If IsObj($oTable2) Then For $oTable In $oTable2 If $oTable.className = "classNameToSearch" Then $TableArray = _IETableWriteToArray ($oTable) $Dim = UBound($TableArray, 0) $Rows = UBound($TableArray) $Cols = UBound($TableArray, 2) If $Rows > 0 Then For $n = 0 To ($Rows - 1) Step 1 If $Cols > 0 Then For $m = 0 To ($Cols - 1) Step 1 ;MsgBox(0,'','') FileWriteLine("C:\Table.txt",StringStripWS($TableArray[$n][$m],8)) ;If StringStripWS($TableArray[$n][$m],8)="" then $x=$x+1 ;MsgBox(0,'',$x) If $x=3 then Global $Link=StringStripWS($TableArray[$n][$m],8) ;MsgBox(0,"",$Link) EndIf Next EndIf Next EndIf EndIf Next EndIf ;WinSetState("Local Number Portability - HOME - Microsoft Internet Explorer","",@SW_ENABLE) _IEClickLinkByText($oIE, $Link) _IELoadWait($oIE,10) $o_form = _IEFormGetObjByIndex($oIE, 0) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defaultNext") $oSubmitButton.Click _IELoadWait($oIE,10) $o_form = _IEFormGetObjByIndex($oIE, 0) $o_login2 = _IEFormElementGetObjByName ($o_form, "internalAgentComments") _IEFormElementSetValue ($o_login2, @UserName) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defer") $oSubmitButton.Click _IELoadWait($oIE,10) EndFunc Link to comment Share on other sites More sharing options...
BabyBeast Posted July 12, 2006 Share Posted July 12, 2006 You need to create 9 more object reference, or just create a array like what manadar say then do what you want to do within a loop (easiest I think) Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 You need to create 9 more object reference, or just create a array like what manadar saythen do what you want to do within a loop (easiest I think)Do I need to download the latest version of IE.au3? Because I can't use _IECreate("http://url").DaleHolm- Can I do this with the old IE.au3? Link to comment Share on other sites More sharing options...
DaleHohm Posted July 12, 2006 Share Posted July 12, 2006 Do I need to download the latest version of IE.au3? Because I can't use _IECreate("http://url").DaleHolm- Can I do this with the old IE.au3?In the old version you need to break that into _IECreate and _IENavigateSuggest you just install the latest beta of AutoIt however and it will install the newest version of IE.au3 for you.Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 12, 2006 Moderators Share Posted July 12, 2006 (edited) Do I need to download the latest version of IE.au3? Because I can't use _IECreate("http://url").DaleHolm- Can I do this with the old IE.au3?Install the latest beta which includes the latest version of IE.au3.Edit: Dale - you beat me by seconds this time Edited July 12, 2006 by big_daddy Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 Install the latest beta which includes the latest version of IE.au3.Edit: Dale - you beat me by seconds this timeGreat...Now I am gonna get all these errors due to the changes in the UDFs...My beta version was like a millin years old. Can anyone help me out real quick in converting the code posted above to work with the new UDFs?Please any help would be awesome. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 12, 2006 Moderators Share Posted July 12, 2006 Great...Now I am gonna get all these errors due to the changes in the UDFs... My beta version was like a millin years old. Can anyone help me out real quick in converting the code posted above to work with the new UDFs? Please any help would be awesome.expandcollapse popupFunc Load_Test() $var = IniReadSection($File, "LNP") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Return 0 EndIf For $i = 1 To $var[0][0] ;MsgBox(4096, "", "Key: " & $var[$i][0] & @CRLF & "Value: " & $var[$i][1]) $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") Global $Title = $var[$i][0] Global $oIE = _IECreate () _IELoadWait ($oIE, 10) _IENavigate ($oIE, IniRead($File, "URLs", "LNP", "https://lnp-uat.activationnow.com/lnp/jsp/logon/login.jsp")) $PasswordName = "j_password" $o_form = _IEFormGetCollection ($oIE, 0) $o_login = _IEFormElementGetObjByName ($o_form, "j_username") $o_password = _IEFormElementGetObjByName ($o_form, $PasswordName) _IEFormElementSetValue ($o_login, $var[$i][0]) _IEFormElementSetValue ($o_password, $var[$i][1]) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "login") $oSubmitButton.Click WinWaitActive("Local Number Portability - HOME - Microsoft Internet Explorer", "", 5) WinSetTitle("Local Number Portability - HOME - Microsoft Internet Explorer", "", $Title) WinSetState($Title, "", @SW_MAXIMIZE) For $c = 1 To 500 Cycle() Next Sleep(1000) _IELinkClickByText ($oIE, "LOGOFF") Sleep(1000) WinClose("LNP Manager Login Screen - Microsoft Internet Explorer", "") Sleep(1500) Next EndFunc ;==>Load_Test Func Cycle() _IENavigate ($oIE, "https://lnp-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") _IELoadWait ($oIE, 10) $oTable2 = _IETableGetCollection ($oIE) ;WinSetState("Local Number Portability - HOME - Microsoft Internet Explorer","",@SW_DISABLE) FileDelete("C:\Table.txt") $x = 0 If IsObj($oTable2) Then For $oTable In $oTable2 If $oTable.className = "classNameToSearch" Then $TableArray = _IETableWriteToArray ($oTable) $Dim = UBound($TableArray, 0) $Rows = UBound($TableArray) $Cols = UBound($TableArray, 2) If $Rows > 0 Then For $n = 0 To ($Rows - 1) Step 1 If $Cols > 0 Then For $m = 0 To ($Cols - 1) Step 1 ;MsgBox(0,'','') FileWriteLine("C:\Table.txt", StringStripWS($TableArray[$n][$m], 8)) ;If StringStripWS($TableArray[$n][$m],8)="" then $x = $x + 1 ;MsgBox(0,'',$x) If $x = 3 Then Global $Link = StringStripWS($TableArray[$n][$m], 8) ;MsgBox(0,"",$Link) EndIf Next EndIf Next EndIf EndIf Next EndIf ;WinSetState("Local Number Portability - HOME - Microsoft Internet Explorer","",@SW_ENABLE) _IELinkClickByText ($oIE, $Link) _IELoadWait ($oIE, 10) $o_form = _IEFormGetCollection ($oIE, 0) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defaultNext") $oSubmitButton.Click _IELoadWait ($oIE, 10) $o_form = _IEFormGetCollection ($oIE, 0) $o_login2 = _IEFormElementGetObjByName ($o_form, "internalAgentComments") _IEFormElementSetValue ($o_login2, @UserName) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defer") $oSubmitButton.Click _IELoadWait ($oIE, 10) EndFunc ;==>Cycle Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 --> IE.au3 Warning from function _IELinkClickByText, $_IEStatus_NoMatch --> IE.au3 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch --> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 --> IE.au3 Warning from function _IELinkClickByText, $_IEStatus_NoMatch --> IE.au3 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch --> IE.au3 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType Nevermind...I fixed it. However I still need some help on the following: For $x=0 to 3 $oIE[$x] = _IECreate("http://url") Next I am getting: Missing subscript dimensions in "Dim" statement.: Global $oIE[$i] = _IECreate("http://url") Global $oIE[$i] = ^ ERROR Link to comment Share on other sites More sharing options...
DaleHohm Posted July 12, 2006 Share Posted July 12, 2006 Great...Now I am gonna get all these errors due to the changes in the UDFs...My beta version was like a millin years old. Can anyone help me out real quick in converting the code posted above to work with the new UDFs?Please any help would be awesome.The basenote of the IE.au3 T2.0 post also has a campatability include file that you can include in your scripts designed to allow everything written for the old version to run with the new... this way you can upgrade at your own pace.Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 Ok here is what I got so far....I am a little slow sometimes but what do I need to do with the following function for it to open up multiple windows and do all the clicking at the same time? Func Load_Test() $var = IniReadSection($File, "VOIP") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Return 0 EndIf $Total=$var[0][0] For $i = 0 To $var[0][0] $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") Global $Title = $var[$i][0] Dim $oIE[$Total+1] $oIE[$i] = _IECreate ("https://voipgui-uat.activationnow.com/lnp/jsp/logon/login.jsp") $PasswordName = "j_password" $o_form = _IEFormGetCollection ($oIE[$i], 0) $o_login = _IEFormElementGetObjByName ($o_form, "j_username") $o_password = _IEFormElementGetObjByName ($o_form, $PasswordName) _IEFormElementSetValue ($o_login, "knorth") _IEFormElementSetValue ($o_password, "kim") ; Exit $oSubmitButton = _IEFormElementGetObjByName ($o_form, "login") $oSubmitButton.Click WinWaitActive("Local Number Portability - HOME - Microsoft Internet Explorer", "", 5) WinSetTitle("Local Number Portability - HOME - Microsoft Internet Explorer", "", $Title) WinSetState($Title, "", @SW_MAXIMIZE) For $c = 1 To 1 _IENavigate ($oIE[$i], "https://voipgui-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") _IELoadWait ($oIE[$i], 10) $oTable2 = _IETableGetCollection ($oIE[$i]) FileDelete("C:\Table.txt") $x = 0 If IsObj($oTable2) Then For $oTable In $oTable2 If $oTable.className = "classNameToSearch" Then $TableArray = _IETableWriteToArray ($oTable) $Dim = UBound($TableArray, 0) $Rows = UBound($TableArray) $Cols = UBound($TableArray, 2) If $Rows > 0 Then For $n = 0 To ($Rows - 1) Step 1 If $Cols > 0 Then For $m = 0 To ($Cols - 1) Step 1 ;MsgBox(0,'','') FileWriteLine("C:\Table.txt", StringStripWS($TableArray[$n][$m], 8)) ;If StringStripWS($TableArray[$n][$m],8)="" then $x = $x + 1 ;MsgBox(0,'',$x) If $x = 3 Then Global $Link = StringStripWS($TableArray[$n][$m], 8) ;MsgBox(0,"",$Link) EndIf Next EndIf Next EndIf EndIf Next EndIf _IELinkClickByText ($oIE[$i], $Link) _IELoadWait ($oIE, 10) $o_form = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defaultNext") $oSubmitButton.Click _IELoadWait ($oIE[$i], 10) $o_form = _IEFormGetCollection ($oIE[$i], 0) $o_login2 = _IEFormElementGetObjByName ($o_form, "internalAgentComments") _IEFormElementSetValue ($o_login2, @UserName) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defer") $oSubmitButton.Click _IELoadWait ($oIE[$i], 10) Next _IELinkClickByText ($oIE[$i], "LOGOFF") Sleep(1000) WinClose("LNP Manager Login Screen - Microsoft Internet Explorer", "") Next EndFunc ;==>Load_Test Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 okkkkk.... Almost DONE!!!! Just need help on how to goto the first internet explorer window after the for loop: $var = IniReadSection($File, "VOIP") If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Return 0 EndIf $Total=$var[0][0] For $i = 1 To $var[0][0] $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") Global $Title = $var[$i][0] Dim $oIE[$Total+1] $oIE[$i] = _IECreate ("https://voipgui-uat.activationnow.com/lnp/jsp/logon/login.jsp") $PasswordName = "j_password" $o_form = _IEFormGetCollection ($oIE[$i], 0) $o_login = _IEFormElementGetObjByName ($o_form, "j_username") $o_password = _IEFormElementGetObjByName ($o_form, $PasswordName) _IEFormElementSetValue ($o_login, $var[$i][0]) _IEFormElementSetValue ($o_password, $var[$i][1]) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "login") $oSubmitButton.Click WinWaitActive("Local Number Portability - HOME - Microsoft Internet Explorer", "", 5) WinSetTitle("Local Number Portability - HOME - Microsoft Internet Explorer", "", $Title) ; WinSetState($Title, "", @SW_MAXIMIZE) _IENavigate ($oIE[$i], "https://voipgui-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") $oTable2 = _IETableGetCollection ($oIE[$i]) FileDelete("C:\Table.txt") $x = 0 If IsObj($oTable2) Then For $oTable In $oTable2 If $oTable.className = "classNameToSearch" Then $TableArray = _IETableWriteToArray ($oTable) $Dim = UBound($TableArray, 0) $Rows = UBound($TableArray) $Cols = UBound($TableArray, 2) If $Rows > 0 Then For $n = 0 To ($Rows - 1) Step 1 If $Cols > 0 Then For $m = 0 To ($Cols - 1) Step 1 ;MsgBox(0,'','') FileWriteLine("C:\Table.txt", StringStripWS($TableArray[$n][$m], 8)) ;If StringStripWS($TableArray[$n][$m],8)="" then $x = $x + 1 ;MsgBox(0,'',$x) If $x = 3 Then Global $Link = StringStripWS($TableArray[$n][$m], 8) ;MsgBox(0,"",$Link) EndIf Next EndIf Next EndIf EndIf Next EndIf _IELinkClickByText ($oIE[$i], $Link) $o_form = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defaultNext") $oSubmitButton.Click _IELoadWait ($oIE[$i], 10) $o_form = _IEFormGetCollection ($oIE[$i], 0) $o_login = _IEFormElementGetObjByName ($o_form, "internalAgentComments") _IEFormElementSetValue ($o_login, @UserName) $o_form = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton2 = _IEFormElementGetObjByName ($o_form, "defer") $oSubmitButton2.Click _IELoadWait ($oIE[$i], 10) Next _IENavigate ($oIE[1], "https://voipgui-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 12, 2006 Author Share Posted July 12, 2006 Anyone?????? Please HELP!!!!!!! Do I have to use _IEAttach()? How do I tell the function to go to the first window I created and do actions with that first window? Link to comment Share on other sites More sharing options...
DjDeep00 Posted July 13, 2006 Author Share Posted July 13, 2006 DONE!!!!!!!!!!!!! Thanx Guys.... If anyone needs to do the same thing: $var = IniReadSection($File, "LNP") TrayTip("","",0) If @error Then MsgBox(4096, "", "Error occured, probably no INI file.") Return 0 EndIf $Total=$var[0][0] For $i = 1 To $var[0][0] TrayTip("Processing " & $var[$i][0], $i & " of " & $var[0][0] , 2, 1) $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") Global $Title = $var[$i][0] Dim $oIE[$Total+1] $oIE[$i] = _IECreate (IniRead($File,"URLs","LNP","https://lnp-uat.activationnow.com/lnp/jsp/logon/login.jsp")) $PasswordName = "j_password" $o_form = _IEFormGetCollection ($oIE[$i], 0) $o_login = _IEFormElementGetObjByName ($o_form, "j_username") $o_password = _IEFormElementGetObjByName ($o_form, $PasswordName) _IEFormElementSetValue ($o_login, $var[$i][0]) _IEFormElementSetValue ($o_password, $var[$i][1]) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "login") $oSubmitButton.Click WinWaitActive("Local Number Portability - HOME - Microsoft Internet Explorer", "", 5) WinSetTitle("Local Number Portability - HOME - Microsoft Internet Explorer", "", $Title) _IENavigate ($oIE[$i], "https://lnp-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") $oTable2 = _IETableGetCollection ($oIE[$i]) FileDelete("C:\Table.txt") $x = 0 If IsObj($oTable2) Then For $oTable In $oTable2 If $oTable.className = "classNameToSearch" Then $TableArray = _IETableWriteToArray ($oTable) $Dim = UBound($TableArray, 0) $Rows = UBound($TableArray) $Cols = UBound($TableArray, 2) If $Rows > 0 Then For $n = 0 To ($Rows - 1) Step 1 If $Cols > 0 Then For $m = 0 To ($Cols - 1) Step 1 FileWriteLine("C:\Table.txt", StringStripWS($TableArray[$n][$m], 8)) $x = $x + 1 If $x = 3 Then Global $Link = StringStripWS($TableArray[$n][$m], 8) EndIf Next EndIf Next EndIf EndIf Next EndIf _IELinkClickByText ($oIE[$i], $Link) $o_form = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton = _IEFormElementGetObjByName ($o_form, "defaultNext") $oSubmitButton.Click _IELoadWait ($oIE[$i], 10) $o_form = _IEFormGetCollection ($oIE[$i], 0) $o_login = _IEFormElementGetObjByName ($o_form, "internalAgentComments") _IEFormElementSetValue ($o_login, @UserName) $o_form = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton2 = _IEFormElementGetObjByName ($o_form, "defer") $oSubmitButton2.Click _IELoadWait ($oIE[$i], 10) WinSetTitle("LNP - Call Center Agent Website - Microsoft Internet Explorer", "", $Title) Next $End=500 For $s=1 to $End For $i = 1 To $var[0][0] TrayTip("Processing " & $var[$i][0], $s & " of " & $End, 2, 1) Sleep(1000) $oIE[$i]=_IEAttach($var[$i][0],"Embedded") _IENavigate ($oIE[$i], "https://lnp-uat.activationnow.com/lnp/dlpage?action=worklist&lpageid=Please%20select%20a%20work%20list") $oTable2 = _IETableGetCollection ($oIE[$i]) FileDelete("C:\Table.txt") $x = 0 If IsObj($oTable2) Then For $oTable In $oTable2 If $oTable.className = "classNameToSearch" Then $TableArray = _IETableWriteToArray ($oTable) $Dim = UBound($TableArray, 0) $Rows = UBound($TableArray) $Cols = UBound($TableArray, 2) If $Rows > 0 Then For $n = 0 To ($Rows - 1) Step 1 If $Cols > 0 Then For $m = 0 To ($Cols - 1) Step 1 FileWriteLine("C:\Table.txt", StringStripWS($TableArray[$n][$m], 8)) $x = $x + 1 If $x = 3 Then Global $Link = StringStripWS($TableArray[$n][$m], 8) EndIf Next EndIf Next EndIf EndIf Next EndIf _IELinkClickByText ($oIE[$i], $Link) $o_form4 = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton3 = _IEFormElementGetObjByName ($o_form4, "defaultNext") $oSubmitButton3.Click _IELoadWait ($oIE[$i], 10) $o_form5 = _IEFormGetCollection ($oIE[$i], 0) $o_login6 = _IEFormElementGetObjByName ($o_form5, "internalAgentComments") _IEFormElementSetValue ($o_login6, "adfsadfsdfsdffsdfsadf") $o_form7 = _IEFormGetCollection ($oIE[$i], 0) $oSubmitButton7 = _IEFormElementGetObjByName ($o_form7, "defer") $oSubmitButton7.Click _IELoadWait ($oIE[$i], 10) WinSetTitle("LNP - Call Center Agent Website - Microsoft Internet Explorer", "", $var[$i][0]) Next Next 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