20 posts in this topic
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'm trying to use InetGet function to download multiple images from a website, some pages having three images, some pages having 4 images some of them having more...
I wrote belong codes to work with autoit and having issues when autoit find not matching url available then autoit just script stopped without any error and I just want to same all the avaialble images on the website if links are not more left then script should moves on but script just stopped...
Here is complete scenerio
I've so many webpages with random number of images are hosting on those pages, in below code, InetGet able to download first three files easily and when it reaches to 4th link that is missing on the webpage that's why script stopped just but I want autoit to download only those images those are links are available and rest of files needs to be skipped automatically for this page if on the next page 4th link of image avaiable then autoit script needs to download 4th one also.
Furthermore, please help me to download files with it's original names instead of whatever name I want to same them like in InetGet I've to give some name to the file that I'm willind to download instead of original name that is available online.
Please Help me.
Here i my code;
$File6 = @ScriptDir & "\images_source.txt" $txt6 = FileRead($File6) $target_source7 = _StringBetween($txt6, 'src="', '"') if Not @error Then InetGet ( $target_source7, @ScriptDir & '\Description\Image1.jpg'); 1st image download coz link is available InetGet ( $target_source7, @ScriptDir & '\Description\Image2.jpg'); 2nd image download coz link is available InetGet ( $target_source7, @ScriptDir & '\Description\Image3.jpg'); 3rd image download coz link is available InetGet ( $target_source7, @ScriptDir & '\Description\Image4.jpg'); 4th image not able to download coz link is not available and script just stopped EndIf
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?
Since I'm able to get a Dell equipment warranty status thanks to my API key, I'm using an UDF to extract data from an XML file and get the end date. >
Thing is, when using InetGet, the original file is in JSON format and the UDF is not working anymore, even if I download the file with the xml extension. Therefore, and when I manually download the page with Chrome, I have a proper XML file where the UDF is working fine.
Here's my code:
I even tried to convert the json to xml > https://www.autoitscript.com/forum/topic/185717-js-json-to-xml/
I took a look here https://www.autoitscript.com/forum/topic/104150-json-udf-library-fully-rfc4627-compliant/ but I don't understand anything :/
The XML read UDF is just perfect for my needs but I'm stuck here...
Thanks for any help you can provide
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 188.8.131.52 version.