bmarky Posted August 11, 2008 Posted August 11, 2008 Hi, again me I can't get to work my script, to open all the link that _IELinkGetCollection "collected". Any idea? Any feature to filter those links it opens? Thank you for your help! Mark
PsaltyDS Posted August 11, 2008 Posted August 11, 2008 Hi, again me I can't get to work my script, to open all the link that _IELinkGetCollection "collected". Any idea? Any feature to filter those links it opens?Thank you for your help!MarkShow what you tried.A very common mistake (easily found if you searched first) is to attempt to continue using objects in the collection after having navigated IE away from the page it came from, which invalidates all the objects in the collection. Any chance you are repeating that well worn faux pas? 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
bmarky Posted August 12, 2008 Author Posted August 12, 2008 Hello! Here is the script: #include <IE.au3> $oIE = _IECreate ("http://swle.yarold.eu/main.php") Sleep (5000) Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("nickname") Send ("{TAB}") Send ("password") Send ("{TAB}") Send ("{TAB}") Send ("{ENTER}") Sleep (5000) $oLinks = _IELinkGetCollection ($oIE) $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") For $oLink In $oLinks _IECreate ($oLink.href) Sleep (1) Next Now, it working! (So nice login method ) 2 things remarning. How could i filter wich link to open? Some easyer way to login? Thanks for help! Mark
bmarky Posted August 12, 2008 Author Posted August 12, 2008 (edited) Just would like to show where i am expandcollapse popup#include <IE.au3> $i = -1 $usernm = ":P" $passwd = ":P" $oIE = _IECreate ("http://swle.yarold.eu/main.php") $HATT = "A human awareness test" WinWait("Yarold's Samurai War Link Exchange - Windows Internet Explorer") Sleep (500) Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") Send ("{TAB}") ;$usernm = InputBox("Username", "Enter your username.") Sleep (150) Send ($usernm) Send ("{TAB}") ;$passwd = InputBox("Password", "Enter your password.", "", "*") Sleep (150) Send ($passwd) Send ("{TAB}") Send ("{TAB}") Send ("{ENTER}") Sleep (7000) $oLinks = _IELinkGetCollection ($oIE) $iNumLinks = @extended $iNumLinks2 = $iNumLinks - 23 MsgBox(0, "Link Info", $iNumLinks2 & " links found") For $oLink In $oLinks $i = $i + 1 If $i > 22 OR $iNumLinks - 1 > $i Then _IELinkClickByIndex ($oLink.href, $i, 0) If _IEPropertyGet ($oLink, "tilte")= $HATT Then MsgBox (0, "HAT!", "I found a Human Awarness Test! Watch out!") Endif EndIf Sleep (1) Next I have an idea for filtering, i will use IELinkClickbyIndex with an if method. Too lazy to calculate now The only thing that i cant get work, theIf _IEPropertyGet ($oLink, "tilte")= $HATT Then MsgBox (0, "HAT!", "I found a Human Awarness Test! Watch out!") Endif Could anybody help to fix it? Update: with IELink.... , but not workig Pls check out, whats the problem Edited August 12, 2008 by bmarky
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