Jump to content

question regarding _Ie click by index


pezo89
 Share

Recommended Posts

Hi guys, i where just wondering about the _Ieclickbyindex, is there an easy way to actully know what the number on the active links are?..

say you got a page. and u want the 23'rd link, how do you click that? counting tab's aint helping lol :D

Link to comment
Share on other sites

_IELinkClickByIndex($oIE, 22)

If that doesn't work, how did you decide it was the "23'rd link"? What other attributes tell you it's the right link? Text? Position?

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

_IELinkClickByIndex($oIE, 22)

If that doesn't work, how did you decide it was the "23'rd link"? What other attributes tell you it's the right link? Text? Position?

:mellow:

the 23'rd link was just an example :(

iv tried clicking ontop of the browser, then counting tab presses to the correct link, but that does not work lol :lol:

Link to comment
Share on other sites

Use _IELinkGetCollection() to get a collection of all links then loop through them looking for... whatever it is you're looking for.

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Global $Paused
sleep ("1000")
;;+2
HotKeySet("{Pause}", "TogglePause")
HotKeySet("{Insert}", "Terminate")
#include <IE.au3>

$oIE = _IECreate ("http://www.?????.??/last/")
send ("{Pause}")

#include <IE.au3>
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
For $oLink In $oLinks
    MsgBox(0, "Link Info", $oLink.href)
Next


;;;;;;;;
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        toolTip('Script -  "Scriptet er - AV"',0, 40)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()

    Exit 0
EndFunc
Func End()
$counter=0
EndFunc

Use _IELinkGetCollection() to get a collection of all links then loop through them looking for... whatever it is you're looking for.

:mellow:

yea this works but is there a way to have it like write it down in notepad or somthing? easie to count them ^^

Link to comment
Share on other sites

What are you talking about? You already have the count:

$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")

If that's not it, what do you want to count?

:mellow:

Edit: Maybe just list by index?

$oLinks = _IELinkGetCollection ($oIE)
$sMsg = "There are " & @extended & " links:" & @CRLF
$i = 0
For $oLink In $oLinks
    $sMsg &= $i & ":  " & $oLink.href & @CRLF
    $i += 1
Next
MsgBox(0, "Link Index Info", $sMsg)
Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

What are you talking about? You already have the count:

$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")

If that's not it, what do you want to count?

:mellow:

Edit: Maybe just list by index?

$oLinks = _IELinkGetCollection ($oIE)
$sMsg = "There are " & @extended & " links:" & @CRLF
$i = 0
For $oLink In $oLinks
    $sMsg &= $i & ":  " & $oLink.href & @CRLF
    $i += 1
Next
MsgBox(0, "Link Index Info", $sMsg)

i'm looking for a way to have a number on each link found, as it detects 252 links on the site im looking for, and i kinda need the linknumber on roughly 50 of them

Link to comment
Share on other sites

#include <IE.au3>

$oIE = _IECreate ("Blank")
send ("{Pause}")

#include <IE.au3>
$i = 0
$oLinks = _IELinkGetCollection ($oIE)
$iNumLinks = @extended
MsgBox(0, "Link Info", $iNumLinks & " links found")
For $oLink In $oLinks
$i += 1
    MsgBox(0, $i, $oLink.href)

Next

#ce
;;;;;;;;
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        toolTip('Script -  "Scriptet er - AV"',0, 40)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()

    Exit 0
EndFunc
Func End()
$counter=0
EndFunc

got it working =)

well not exactly what i was looking for, but it does the trick ^^ :mellow:

Edited by pezo89
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...