2 posts in this topic
When I launch a URL and the webpage takes more time to load (say more than 1 minute), I want the URL to be relaunched.
I used _IELoadWait(). But the control doesn't get pass through the _IELoadWait() command, since the webpage takes more time to load.
I searched some of the older posts related to this topic. But I couldn't work them out.
Please guide me.
I'm using an online translator for Spanish in which you give the verb and website gives the conjugations. The website I'm using is: http://www.spanishdict.com/conjugate/tener where "tener" means "to have" in English.
In the screenshot, you can see the present tense (5 yellow highlighted items) and the imperfects (5 blue boxes). I don't need to get the translation for "vosotros", so I didn't make any color on that row. I'm trying to get these 10 translations to be written on the output for my code. But my code is so simple (because I couldn't go into the div / tr / td):
#include <IE.au3> #include <Array.au3> Local $sSpanishWord = "tener" ;to have ;Local $sSpanishWord = "abrir" ;to open Local $oIE = _IECreate ("http://www.spanishdict.com/conjugate/" & $sSpanishWord) ;http://www.spanishdict.com/conjugate/tener ;http://www.spanishdict.com/conjugate/abrir ;== Try using _IETagNameAllGetCollection Local $oElements = _IETagNameAllGetCollection($oIE) For $oElement In $oElements If $oElement.id Then ConsoleWrite("Tagname: " & $oElement.tagname & @CRLF & "id: " & $oElement.id & @CRLF & "innerText: " & $oElement.innerText & @CRLF & @CRLF) EndIf Next ;== Try using _IETagNameGetCollection Local $sTable Local $oTableCells Local $oTableRows = _IETagNameGetCollection($oIE, "tr") For $oTableRow In $oTableRows $sTable = "" $oTableCells = _IETagNameGetCollection($oTableRow, "td") ;I don't know how to continue from here on Next I used the IE to find out the tr / td stuff, but I think I'm lost.
P.S: The verb "tener" can be difficult, because it has red letters because of irregular. The verb "abrir" can be much easier, because it's a regular verb.
i have two files a.au3 and b.au3 the both contains the same code which is :
#include <IE.au3> #include <MsgBoxConstants.au3> Global $myUrl = "https://www.autoitscript.com" RegWrite('HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main','SessionMerging','REG_DWORD','00000000') ShellExecute ("iexplore.exe", " -nosessionmerging about:blank") WinWait ("Blank Page") Global $oIE = _IEAttach ("about:blank", "url") _IELoadWait ($oIE) _IENavigate ($oIE, $myUrl) when i launch the both files in the same time two blank windows are opens.
what im waiting for is that every window navigate to the link but what happen is the first and the second file navigate the url to the same window and the seconde window stay about:blank
i think the problem happen because i try to open the same url in both windows
so i need i way to navigate to the same url from two different windows
Thanks in advance
I have a page with several hundred <div>s, and each <div> has several hundred child <div>s, each with their own children
when I use _IETagNameGetCollection($ie, "div", 0) I get them all, but I need to find a way to get say the 3rd child of the 5th child of the second top level <div>
I have not yet been able to find anything along this line
Is there any way to determine if an element is a child, parent, sibling?
Does anyone have any idea why Test() returns 0, while Test2() returns 1?
#include <IE.au3> MsgBox(0, "", Test() & " " & Test2()) Func Test() Local $oHTML = ObjCreate("HTMLFILE") $oHTML.body.innerHTML = FileRead("Test.html") Return IsObj($oHTML.getElementsByClassName("example")) EndFunc Func Test2() Local $oIE = _IEAttach("", "instance", 1) Return IsObj($oIE.document.getElementsByClassName("example")) EndFunc Sample Test.html I open in IE before testing:
<!DOCTYPE html> <html> <body> <p class="example"></p> <div class="example"></div> </body> </html> I'm receiving html text in a response to http request, I need to parse it fast and easy, getElementsByClassName would have been ideal. I'm using 220.127.116.11 version.