Sign in to follow this  
Followers 0
pezo89

question regarding _Ie click by index

14 posts in this topic

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

Share this post


Link to post
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

Share this post


Link to post
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:

Share this post


Link to post
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

Share this post


Link to post
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 ^^

Share this post


Link to post
Share on other sites

i was thinking somthing on

$i = +1

and

MsgBox(0, $i, $oLink.href)

but how do i get it to count up?

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

thx alot, kinda works, but is there a way to scroll it?.. i mean on the list of results

as i can only see up to link 63 :S

Share this post


Link to post
Share on other sites

hehe i'm trying im trying, been looking around on the forum for a solution =)

and trial and error :mellow:

Share this post


Link to post
Share on other sites

Write it, test it, debug it, and if you get stuck: Post the code for more help.

: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

Share this post


Link to post
Share on other sites

Write it, test it, debug it, and if you get stuck: Post the code for more help.

:(

will do =)

Thx for the help thou :mellow:

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

#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

Share this post


Link to post
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
Sign in to follow this  
Followers 0