pezo89 Posted February 11, 2010 Share Posted February 11, 2010 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 11, 2010 Share Posted February 11, 2010 _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? 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 More sharing options...
pezo89 Posted February 11, 2010 Author Share Posted February 11, 2010 _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?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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 11, 2010 Share Posted February 11, 2010 Use _IELinkGetCollection() to get a collection of all links then loop through them looking for... whatever it is you're looking for. 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 More sharing options...
pezo89 Posted February 12, 2010 Author Share Posted February 12, 2010 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 EndFuncUse _IELinkGetCollection() to get a collection of all links then loop through them looking for... whatever it is you're looking for. 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 More sharing options...
pezo89 Posted February 12, 2010 Author Share Posted February 12, 2010 i was thinking somthing on $i = +1 and MsgBox(0, $i, $oLink.href) but how do i get it to count up? Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 12, 2010 Share Posted February 12, 2010 (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? 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 February 12, 2010 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 More sharing options...
pezo89 Posted February 12, 2010 Author Share Posted February 12, 2010 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? 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 More sharing options...
pezo89 Posted February 12, 2010 Author Share Posted February 12, 2010 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 12, 2010 Share Posted February 12, 2010 Time to put some of your own effort into it... 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 More sharing options...
pezo89 Posted February 12, 2010 Author Share Posted February 12, 2010 hehe i'm trying im trying, been looking around on the forum for a solution =) and trial and error Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 12, 2010 Share Posted February 12, 2010 Write it, test it, debug it, and if you get stuck: Post the code for more help. 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 More sharing options...
pezo89 Posted February 13, 2010 Author Share Posted February 13, 2010 Write it, test it, debug it, and if you get stuck: Post the code for more help. will do =)Thx for the help thou Link to comment Share on other sites More sharing options...
pezo89 Posted February 13, 2010 Author Share Posted February 13, 2010 (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 ^^ Edited February 13, 2010 by pezo89 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now