-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Bensdb
Hi -
I am simply trying to loop through pages of a website using _IENavigate..
For some reason it freezes on page 2, rather than continuing through the loop.
I have been trying to fix this for hours and I am really at the end of my tether with it...
Any experienced Autoit'ers fancy having a bash for me?
I've tried sleep, messing with the IE.au3 file, rewriting the whole script to try to target the link after the active link in the nav menu....EVERYTHING.
Just a beginner who is thoroughly stuck after hours of trying.
#include <MsgBoxConstants.au3> #include <IE.au3> #include <Array.au3> #include <File.au3> Global $oIE = _IECreate("http://www.jobhero.ph/resume-search/all/1") For $i = 2 To 5 ; THIS IS WHERE AUTOIT LOSES THE CONNECTION TO BROWSER AFTER ~2-3 URLS sleep(4000) ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< added this to give time between navigations _IENavigate($oIE, "http://www.jobhero.ph/resume-search/all/" & $i) If @error Then MsgBox(0, "Error", "There was a problem opening webpage!") EndIf Next
-
By Mucho
Hi,
I'm trying to navigate down my company's website. I successfully use _IELinkClickByText to open the first link ("Today's Events") which opens a new page with a different address.
Then I need to click on another link ("Meetings") on this new page to get to my destination but I can't get it right.
I cannot use _IENavigate as the address link of "Meetings" can change.
I cannot find any good example on this forum and the web to follow, so I hope someone can help.
#include <IE.au3> ;Main Page $oIE =_IECreate ("http://abc/xyz/", 0, 1, 1, 1) WinSetState("Report - ABC - Windows Internet Explorer","",@SW_MAXIMIZE) Send("{Enter}") ;Login ; Second Level _WinWaitActivate("ABC Intranet Systems - Windows Internet Explorer","") _IELinkClickByText ($oIE, "Today's Events") ;Click on this link after logging in. ; Third Level _WinWaitActivate("Report - ABC - Windows Internet Explorer","") $oIE = _IEAttach ("Report - ABC - Windows Internet Explorer","", "url") ; I want to click on "Meetings", the addess of which is not constant. _IELinkClickByText ($oIE, "Meetings") #region --- Internal functions Au3Recorder Start --- Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc -
By Yokes9
I'm trying to pull the class from a table. I have no problem pulling the href but the class is giving me errors.
Here is what i'm trying to do.
$oForm = _IETableGetCollection ($oIE, 3) $oLinks = _IETagnameGetCollection($oForm, "TR") For $oLink in $oLinks ConsoleWrite($oLink.class & @CRLF) Next So it appears i can't call for .class like i am. Does anyone have any suggestions?
This seems to work just fine though
$oForm = _IETableGetCollection ($oIE, 3) $oLinks = _IETagnameGetCollection($oForm, "a") For $oLink in $oLinks ConsoleWrite($oLink.href & @CRLF) Next
An example of one of the cells in the table--
<tr align="left" class="color"><td><a href="http://autoitscript.com">Good friendly People</a></td>
So what i'm looking for is how to pull out the "color" and add it to the table i'm creating in the next step. I'd really like to just look within the table and not the entire sheet.
Thanks!
-
By Herb191
I use a lot of IE functions in my scripts and find it really annoying when I try to use _IENavigate to leave a webpage and I get popups saying things like "Are you sure you want to leave this page?". I searched the forum and could not find a solution that I liked so I created this function. I hope others find it useful and as always I am open to any constructive criticism (that's how we learn).
_ProcessGetParent() function taken from MrCreatoR's post (thanks MrCreatoR)
#include <IE.au3> ;This page currently has displays a popup when you try to navigate away from the page $any_url = "aquaponics4you.com" ;$any_url = "yahoo.com" $oIE = _IECreate($any_url) $oIE = _IENavigate_kill_popup($oIE, "Google.com") Func _IENavigate_kill_popup($IEObject, $URL, $visible = 1, $wait = 1) If Not IsObj($IEObject) Then Return SetError(1, 0, 0) $closed_process = False ;gets the IE process $pid = WinGetProcess(_IEPropertyGet($IEObject, "hwnd")) ;Trys to navigate to URL _IENavigate($IEObject, $URL, 0) ;Gets list of all process $aProc_List = ProcessList() ;Checks to see if any process were opened by the IE window. If process where opened it closes them and the IE window. For $i = 1 To $aProc_List[0][0] If _ProcessGetParent($aProc_List[$i][1]) = $pid Then ProcessClose($aProc_List[$i][1]) $closed_process = True EndIf Next ;will create a new IE with old IE object varable if it no longer exists. If $closed_process = True Then $IEObject = _IECreate($URL, 0, $wait) Return $IEObject Else If $wait = 1 Then _IELoadWait($IEObject) Return $IEObject EndIf EndFunc ;==>_IENavigate_stop_pop Func _ProcessGetParent($iPID) Local $wbemFlagReturnImmediately = 0x10 Local $wbemFlagForwardOnly = 0x20 Local $colItems = "" Local $strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems If $objItem.ProcessID = $iPID Then Return $objItem.ParentProcessID Next EndIf Return SetError(1, 0, 0) EndFunc ;==>_ProcessGetParent
-