yucatan Posted May 27, 2009 Share Posted May 27, 2009 hi i'm trying to login on this pagehttps://www.moneymiljonair.nl/on the right is a login box but i cant full in the username and password and submit the form this is the code that i have#include <IE.au3> $oIE = _IECreate ("https://www.moneymiljonair.nl/") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "myusername") _IEFormSubmit ($oForm)i dont understand why it dont work plz help me Link to comment Share on other sites More sharing options...
oMBRa Posted May 27, 2009 Share Posted May 27, 2009 do you really think that the example of the help file you have copied and pasted works for every site? anyway I made it for you: #include <IE.au3> $oIE = _IECreate ("https://www.moneymiljonair.nl/") $oForm = _IEFormGetObjByName ($oIE, "loginform") $oUsername = _IEFormElementGetObjByName($oForm, 'login_username') $oPW = _IEFormElementGetObjByName($oForm, 'login_password') _IEFormElementSetValue ($oUsername, "myusername") _IEFormElementSetValue ($oPW, "mypassword") _IEFormSubmit ($oForm) Link to comment Share on other sites More sharing options...
yucatan Posted May 27, 2009 Author Share Posted May 27, 2009 do you really think that the example of the help file you have copied and pasted works for every site? anyway I made it for you: #include <IE.au3> $oIE = _IECreate ("https://www.moneymiljonair.nl/") $oForm = _IEFormGetObjByName ($oIE, "loginform") $oUsername = _IEFormElementGetObjByName($oForm, 'login_username') $oPW = _IEFormElementGetObjByName($oForm, 'login_password') _IEFormElementSetValue ($oUsername, "myusername") _IEFormElementSetValue ($oPW, "mypassword") _IEFormSubmit ($oForm) i'm sorry but u made a great example antother question how did u discovered that u need login_username and login_passwword and loginform Link to comment Share on other sites More sharing options...
oMBRa Posted May 27, 2009 Share Posted May 27, 2009 get the HTML source of the page and search there for the name of the form etc... Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 Or get DebugBar and use the finder tool to get the captured element name or ID. Link to comment Share on other sites More sharing options...
yucatan Posted May 27, 2009 Author Share Posted May 27, 2009 Or get DebugBar and use the finder tool to get the captured element name or ID.now i'm logged in on the website i wanne klik a link witch command i can use the best for that ? Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 Please use the help file, it's your best help . _IELinkClickByText()... Link to comment Share on other sites More sharing options...
yucatan Posted May 27, 2009 Author Share Posted May 27, 2009 Please use the help file, it's your best help . _IELinkClickByText()... _IELinkClickByText ($oIE, "Mails lezen") i get this --> IE.au3 V2.4-0 Warning from function _IELinkClickByText, $_IEStatus_NoMatch this is standing in the html code <a href = "/login/read_mail.php" target = "_self"> Mails lezen </a> Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 Strange, it should work. $oAnchs = _IETagNameGetCollection($oIE, 'a') For $oAnch In $oAnchs If StringInStr(_IEPropertyGet($oAnch, 'outertext'), 'mails lezen') Then _IEAction($oAnch, 'click') ExitLoop EndIf Next ; Or For $oAnch In $oAnchs If $oAnch.href = '/login/read_mail.php' Then _IEAction($oAnch, 'click') ExitLoop EndIf Next Link to comment Share on other sites More sharing options...
yucatan Posted May 27, 2009 Author Share Posted May 27, 2009 Strange, it should work. $oAnchs = _IETagNameGetCollection($oIE, 'a') For $oAnch In $oAnchs If StringInStr(_IEPropertyGet($oAnch, 'outertext'), 'mails lezen') Then _IEAction($oAnch, 'click') ExitLoop EndIf Next ; Or For $oAnch In $oAnchs If $oAnch.href = '/login/read_mail.php' Then _IEAction($oAnch, 'click') ExitLoop EndIf Next strange yeah because both samples dont work i use ie7 and 3.3.0.0 autoit version not beta. Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 Maybe the link is located on another frame? Link to comment Share on other sites More sharing options...
yucatan Posted May 27, 2009 Author Share Posted May 27, 2009 Maybe the link is located on another frame? expandcollapse popup<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang = "nl_NL" class = ""> <head> <title>MoneyMiljonair | Sparen en Besparen</title> <base href = "https://www.moneymiljonair.nl"> <meta http-equiv = "Content-Type" content = "text/html; charset=UTF-8"> <meta name = "description" content = "MoneyMiljonair | Sparen en Besparen"> <meta name = "keywords" content = "Sparen, Besparen, Korting, Online spaarprogramma, Cashback, Bingo, Puzzelen, Bijverdienen, Aanbiedingen"> <link href = "/css/default.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/css/common/forms.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/css/forms.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/css/homepage.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/login/css/login.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/login/css/forms.css" rel = "stylesheet" type = "text/css" media = "screen"> <!--[if lte IE 6]> <link href = "/css/default_ie6.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/css/homepage_ie6.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/login/css/login_ie6.css" rel = "stylesheet" type = "text/css" media = "screen"> <![endif]--> <!--[if gte IE 7]> <link href = "/css/homepage_ie7.css" rel = "stylesheet" type = "text/css" media = "screen"> <link href = "/login/css/login_ie7.css" rel = "stylesheet" type = "text/css" media = "screen"> <![endif]--> <script type = "text/javascript" src = "/javascript/swfobject.js"></script> <script type = "text/javascript" src = "/javascript/default.js"></script> <script type = "text/javascript" src = "/javascript/ajax.js"></script> </head> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-7188854-1"); pageTracker._trackPageview(); } catch(err) {} </script> <body> <script type = "text/javascript"> var img = document.createElement ("img"); img.src = "https://www.moneymiljonair.nl/js.php?t=" + new Date ().getTime (); img.width = 0; img.height = 0; setStyle (img, "display", "none"); </script> <noscript> <img src = "https://www.moneymiljonair.nl/js.php" width = "0" height = "0" style = "display: none;"> </noscript> <div id = "top_container"></div> <div id = "middle_container"> <div id = "content"> <div id = "linkerkolom_nav"> <div class = "logoLogedin"> <a href = "/login/"> <img src = "/images/logo_nl_NL.jpg"> </a> </div> <div id = "navigatie"> <h3 class = "eerste">Verdien parels met</h3> <ul> <li> <a href = "/login/membersubmit.php" target = "_self"> Leden aanmelden </a> </li><li> <a href = "/login/webshop.php" target = "_self"> Webwinkels </a> </li><li> <a href = "/login/visit_websites.php" target = "_self"> Websites bezoeken </a> </li><li> <a href = "/login/profile.php" target = "_self"> Profiel invullen </a> </li><li> <a href = "/login/registration.php" target = "_self"> Registreren </a> </li><li> <a href = "/login/information.php" target = "_self"> Informatie aanvragen </a> </li><li> <a href = "/login/charity.php" target = "_self"> Goede doelen </a> </li><li> <a href = "http://www.voordeligetijdschriften.nl/?l=Noord-Brabant&lft=18&opl=VMBO&sid=www.moneymiljonair.nl&uid=504525&g=m" target = "_blank"> Tijdschriften / kranten </a> </li><li> <a href = "/login/read_mail.php" target = "_self"> Mails lezen </a> </li><li> <a href = "/login/puzzle.php" target = "_self"> Puzzelen </a> </li> </ul><h3 class = "overig">Win parels met</h3> <ul> <li> <a href = "/login/bingo.php" target = "_self"> Bingo </a> </li><li> <a href = "/login/scratch.php" target = "_self"> Krassen </a> </li><li> <a href = "/login/games.php" target = "_self"> Spelletjes spelen </a> </li><li> <a href = "/login/paid_games.php" target = "_self"> Betaalde spellen </a> </li> </ul><h3 class = "overig">Account gegevens</h3> <ul> <li> <a href = "/login/balance.php" target = "_self"> Saldo </a> </li><li> <a href = "/login/user_info.php" target = "_self"> Gegevens </a> </li><li> <a href = "/login/bankaccount.php" target = "_self"> Bankgegevens </a> </li><li> <a href = "/login/payout.php" target = "_self"> Uitbetaling aanvragen </a> </li><li> <a href = "/index.php?logout" target = "_self"> Uitloggen </a> </li> </ul> </div> </div> <div id = "top"> <a href="http://www.moneymiljonair.nl/login/?goto=1&action_id=98" target="_blank" style="text-decoration:none;"><div class = "advertenties blauwBorder" style="background:url('../images/daily_top_action_nl_NL.gif');color:white;"><div id = 'daily_action' class = ''>Neckermann.com: vandaag besteld, morgen in huis! Alleen vandaag:<br /> 150.000 parels i.p.v. 80.000 parels!</div> </div></a> <div class = "advertenties orangeBorder"><a href="http://www.moneymiljonair.nl/login/?goto=2"><img title = 'Dagspel' src = '../images/game_2_nl_NL.gif' class = '' id = ''/> </a></div> <div class = "advertenties yellowBorder"><a href="http://www.moneymiljonair.nl/login/?goto=3"><img title = 'Bingo' src = '../images/bingo_nl_NL.gif' class = '' id = ''/> </a></div></a> </div> <div id = "main"> <div class = "inlogbox"> <div class = "inlogboxcontent"> <h3>Welkom ton wittenberg</h3> <span><a href = "/index.php?logout">Uitloggen</a></span><br/> <span><a href = "/login/balance.php">Klik hier om je saldo te bekijken</a></span> </div> <div class = "cornerbottom"> </div> </div><div class = "nieuws"> <div class = "nieuwscontent"> <h2>Nieuws</h2> <ul> <li> <a href = "/login/index.php?news=9"> <span class = "newsdate"> 8 mei | </span> Actief Frankrijk </a> </li><li> <a href = "/login/index.php?news=8"> <span class = "newsdate"> 12 apr | </span> Paaspuzzel </a> </li><li> <a href = "/login/index.php?news=7"> <span class = "newsdate"> 26 feb | </span> Nieuwe site live! </a> </li> </ul> </div> <div class = "nieuwscornerbottom"> </div> </div><table class = "box false" cellpadding = "0" cellspacing = "0"> <tr> <td class = "innerbox "><a href = "/login/scratch.php" target = "_self" class = "" id = ""><img title = 'Kras en win!' src = '../images/box_scratch_nl_NL.gif' class = '' id = ''/> </a><br/> </td> </tr> </table><table class = "box false" cellpadding = "0" cellspacing = "0"> <tr> <td class = "innerbox "><a href = "/login/information.php" target = "_self" class = "" id = ""><img title = 'Vraag GRATIS informatie aan en verdien parels' src = '../images/box_information_nl_NL.gif' class = '' id = ''/> </a><br/> </td> </tr> </table><table class = "box false" cellpadding = "0" cellspacing = "0"> <tr> <td class = "innerbox "><a href = "/login/webshop.php" target = "_self" class = "" id = ""><img title = 'Korting in parels' src = '../images/box_discount_nl_NL.gif' class = '' id = ''/> </a><br/> </td> </tr> </table><table class = "box false" cellpadding = "0" cellspacing = "0"> <tr> <td class = "innerbox "><a href = "/login/webshop.php?c_id=8" target = "_self" class = "" id = ""><img title = 'Veel parels bij je vakantie' src = '../images/box_holiday_nl_NL.gif' class = '' id = ''/> </a><br/> </td> </tr> </table><table class = "box false" cellpadding = "0" cellspacing = "0"> <tr> <td class = "innerbox "><a href = "/login/registration.php" target = "_self" class = "" id = ""><img title = 'Registreer je GRATIS bij ander sites en verdien parels' src = '../images/box_free_registration_nl_NL.gif' class = '' id = ''/> </a><br/> </td> </tr> </table><table class = "box false" cellpadding = "0" cellspacing = "0"> <tr> <td class = "innerbox "><a href = "http://www.voordeligetijdschriften.nl?l=Noord-Brabant&lft=18&opl=VMBO&sid=www.moneymiljonair.nl&uid=504525&g=m" target = "_blank" class = "" id = ""><img title = 'We hebben alle tijdschriften/dagbladen met hoge kortingen!' src = '../images/box_magazines_nl_NL.gif' class = '' id = ''/> </a><br/> </td> </tr> </table> <div style = "height: 12px;"> </div> </div> </div> </div> <div id = "bottom_container"> <div id = "footer"> <div id = "sponsors"> </div> <div id = "footerlinks"> <ul> <li style = "display: none;"></li> <li><a href = "/customer_service.php" title = "Contact & veel gestelde vragen"><span>Contact & veel gestelde vragen</span></a></li> <li><a href = "/advertising.php" title = "Adverteren"><span>Adverteren</span></a></li> <li><a href = "/conditions.php" title = "Voorwaarden"><span>Voorwaarden</span></a></li> <li><a href = "/disclaimer.php" title = "Disclaimer"><span>Disclaimer</span></a></li> </ul> </div> </div> </div> </body> </html> the html code:) Link to comment Share on other sites More sharing options...
Authenticity Posted May 27, 2009 Share Posted May 27, 2009 Then I guess there is no anchor with that exact text. Maybe it's padded or something. Try the next loop and see how it looks like: Global $oAnchs = _IETagNameGetCollection($oIE, 'a') For $oAnch In $oAnchs ConsoleWrite(_IEPropertyGet($oAnch, 'outertext') & @TAB & _IEPropertyGet($oAnch, 'innerText') & @LF) Next Link to comment Share on other sites More sharing options...
Juvigy Posted May 27, 2009 Share Posted May 27, 2009 Basically it should be the same as from Authenticity but also try: $oDoc = _IEDocGetObj($oIE) $oArray = $oDoc.getElementsByTagName("a") For $element In $oArray MsgBox(0,$element.index,$element.innerText) Next Link to comment Share on other sites More sharing options...
yucatan Posted February 16, 2010 Author Share Posted February 16, 2010 (edited) Hello Guys i'm writing a script to click on some links here is the html codeHere is the screenshotexpandcollapse popup<TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2707" target=_blank>ton, verdien €1,25 per aangemelde vriend!</A> </TD> <TD vAlign=top>5</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2693" target=_blank>ton, win een 600 euro VVV Irischeque!</A> </TD> <TD vAlign=top>5</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2712" target=_blank>Welkomstbonus tot 50 euro!</A> </TD> <TD vAlign=top>4</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2719" target=_blank>Doe mee met de Wat vindt Nederland Quiz en WIN!</A> </TD> <TD vAlign=top>4</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2717" target=_blank>Geef je mening en ontvang 25.000 parels!</A> </TD> <TD vAlign=top>3</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2704" target=_blank>Wint u de Jackpot van 14 miljoen euro?</A> </TD> <TD vAlign=top>3</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2715" target=_blank>Win GRATIS boodschappen bij uw supermarkt!</A> </TD> <TD vAlign=top>3</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2703" target=_blank>Bonus: gratis 20 euro speelgeld + 5.000 parels!</A> </TD> <TD vAlign=top>2</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2701" target=_blank>Is het jouw Lucky Day ton?</A> </TD> <TD vAlign=top>2</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2705" target=_blank>ton, win een reis naar Parijs!</A> </TD> <TD vAlign=top>2</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2664" target=_blank>ton, bestel nu een GRATIS spandoek!</A> </TD> <TD vAlign=top>1</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2687" target=_blank>Boek nu de goedkoopste vliegtickets op CheapTickets.nl!</A> </TD> <TD vAlign=top>1</TD> <TD vAlign=top>Nee</TD></TR> <TR> <TD vAlign=top colSpan=3> <HR> </TD></TR> <TR> <TD vAlign=top><A href="http://www.moneymiljonair.nl/login/read_mail.php?id=2679" target=_blank>ton, pak jij die parels?</A> </TD> <TD vAlign=top>1</TD> <TD vAlign=top>Nee</TD></TR></TBODY></TABLE><BR></DIV></TD>every day there are coming new links on the page.i want the script to klik the the first linkthen i get on a page here is a sample how it looks likebgColor=white><SPAN style="FONT: 13px arial">Ontvang direct 2.500 parels door te klikken op de knop 'parels innen' onderaan deze e-mail.<BR><BR> <TABLE id=Table_01 height=694 cellSpacing=0 cellPadding=0 width=500 border=0> <TBODY> <TR> <TD><A href="http://www.moneymiljonair.nl/am.php?i=50452565f2&c=n27072a530d" target=_blank><IMG style="DISPLAY: block" height=231 src="MoneyMiljonair Sparen en Besparen_bestanden/1.gif" width=500 border=0></A></TD></TR>that button need to be clikked then go back to the start klik the second link and so on until all the 10 links are clikked can somebody help me on this? Edited February 16, 2010 by yucatan Link to comment Share on other sites More sharing options...
DaleHohm Posted February 16, 2010 Share Posted February 16, 2010 Please do not pile onto old, dormant posts with new questions. Open a new thread. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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