Jump to content

_IELinkClickByText


 Share

Recommended Posts

Hello,

I have a line of code including _IELinkClickByText that i would like to continuously loop, so if any other link would be posted with these key words the line of code would be able to open that link until i stop the code itself, i have tried

While 1

WEnd

after my line of code to continue the loop but it seems to not want to click any of the links after the code runs for the first time, is there anything im missing for the line of code to constantly repeat?

Link to comment
Share on other sites

You are going to need to post your script, or explain this much better. Preferred method: both.

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

Here is an example of collecting links, and verifying they are new, before performing an action (the ConsoleWrite)

#include <Array.au3>
#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com/forum/forum/2-general-help-and-support/")
Local $aLinks[1]
While IsObj($oIE)
 _IELoadWait($oIE)
 $oLinks = _IELinkGetCollection($oIE)
 For $oLink In $oLinks
  If _IEPropertyGet ($oIE, "readystate") <> 4 Then ExitLoop
  $sLink = $oLink.href
  If _ArraySearch ($aLinks, $sLink) < 0 Then
   ReDim $aLinks[UBound($aLinks)+1]
   $aLinks[UBound($aLinks)-1] = $sLink
   ConsoleWrite($sLink & @CRLF)
  EndIf
 Next
 ConsoleWrite (UBound($aLinks) & @CRLF)
 Sleep(1000)
WEnd

Just do some navigations, and only the new links will be outputed to the console, not dupes

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

It's possible, depedning the length of the run, that the array will become too large...look into _ArrayPush if that becomes the case...then you don't need a growing array, but a fixed one, where the oldest link is pushed out by each new one.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

The only question i have about the array is

These links that i would want that script to automatically click into i have no idea which addresses they will be, because its different for each link that they post. Would there be another option other then an array? I don't want to store any of the websites in the arrays, i would just like for the program to click the newer links that would be coming up in real time.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...