Hirax Posted June 17, 2007 Share Posted June 17, 2007 (edited) Okay well I'm new to the whole IE stuff. So I tried to make a autologin for Adventure Quest. So far I have the script below. So something is wrong with this, I didn't do something right. Don't mind the $Unset variable eventually I will set that to a GUI Input, but until then I need some help with this. #include <IE.au3> _IECreate( "http://aq.battleon.com/Build30/game.asp?launchtype=medium" ) $oUsername = _IEFormElementGetObjByName($oForm, "Username") $oPassword = _IEFormElementGetObjByName($oForm, "Password") $LoginButton = _IEGetObjByName($oForm, "Login") _IEFormElementSetValue($oUsername , $Unset ) _IEFormElementSetValue($oPassword, $Unset ) _IEAction($LoginButton, "click") $PlayButton = _IEGetObjByName($oForm, "Play") _IEAction($PlayButton, "click") Edited June 17, 2007 by Hirax Link to comment Share on other sites More sharing options...
Gif Posted June 17, 2007 Share Posted June 17, 2007 (edited) Okay well I'm new to the whole IE stuff. So I tried to make a autologin for Adventure Quest. So far I have the script below. So something is wrong with this, I didn't do something right. Don't mind the $Unset variable eventually I will set that to a GUI Input, but until then I need some help with this. #include <IE.au3> _IECreate( "http://aq.battleon.com/Build30/game.asp?launchtype=medium" ) $oUsername = _IEFormElementGetObjByName($oForm, "Username") $oPassword = _IEFormElementGetObjByName($oForm, "Password") $LoginButton = _IEGetObjByName($oForm, "Login") _IEFormElementSetValue($oUsername , $Unset ) _IEFormElementSetValue($oPassword, $Unset ) _IEAction($LoginButton, "click") $PlayButton = _IEGetObjByName($oForm, "Play") _IEAction($PlayButton, "click") 1) it would be nice if you tell us what exacly is your problem (where your script doesnt work) 2) you try _IEFormElementGetObjByName() without having got the form with _IEFormGetObjByName (), this is why _IEGetObjByName($oForm, "Login") is completely wrong also use _IEFormSubmit, instead of clicking in the button Edited June 17, 2007 by c4nm7 Link to comment Share on other sites More sharing options...
Hirax Posted June 17, 2007 Author Share Posted June 17, 2007 (edited) 1) it would be nice if you tell us what exacly is your problem (where your script doesnt work)2) you try _IEFormElementGetObjByName() without having got the form with _IEFormGetObjByName (), this is why _IEGetObjByName($oForm, "Login") is completely wrongalso use _IEFormSubmit, instead of clicking in the buttonOkay sorry about that, yes that is where the problem is it says I have not declared the variable and I'm going off another script I found off a myspace auto login thing. So I though maybe it would work for this, but I don't know really what I am doing so I was wondering if someone could give me a hand.EDIT: Okay I can't seem to find the form, but I'm thinking it might be because it's in Adobe Flashplayer 9. So do you know if I'm out of luck : \. Edited June 17, 2007 by Hirax Link to comment Share on other sites More sharing options...
Gif Posted June 17, 2007 Share Posted June 17, 2007 (edited) Okay sorry about that, yes that is where the problem is it says I have not declared the variable and I'm going off another script I found off a myspace auto login thing. So I though maybe it would work for this, but I don't know really what I am doing so I was wondering if someone could give me a hand.well i was going to fix it for you but i realised that there is not a way to fill this form with _IE cause it's everything with javascriptno <form> or <input> so i m pretty sure it's not possible using IEand the form is not by the labels but by the source of the code, right click on the page and choose source, the objectsthat you use are there not on what the page shows so e.g. _IEFormElementGetObjByName($oForm, "Username") the "Username" shouldnt be what the page shows but by the source e.g. <input name="Username"> Edited June 17, 2007 by c4nm7 Link to comment Share on other sites More sharing options...
Hirax Posted June 17, 2007 Author Share Posted June 17, 2007 well i was going to fix it for you but i realised that there is not a way to fill this form with _IE cause it's everything with javascriptno <form> or <input> so i m pretty sure it's not possible using IEOkay yeah I realized that too. So thanks for your help though. Link to comment Share on other sites More sharing options...
DaleHohm Posted June 18, 2007 Share Posted June 18, 2007 (edited) As c4nm7 points out, this is not an HTML form, so the _IEForm functions will not help you here. It is actually a Macromedia Flash object defined with this tag: <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="z38349" WIDTH="800" HEIGHT="600" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"> <PARAM NAME="movie" VALUE="engine/Lore3330.swf"/> <PARAM NAME="FlashVars" VALUE="strGUI=medium"/> <PARAM NAME="allowScriptAccess" value="sameDomain" /> <PARAM NAME="loop" VALUE="false"/> <PARAM NAME="menu" VALUE="false"/> <PARAM NAME="quality" VALUE="High"/> <PARAM NAME="scale" VALUE="exactfit"/> <PARAM NAME="bgcolor" VALUE="#333333"/> <EMBED src="engine/Lore3330.swf" FlashVars="strGUI=medium" loop="false" menu="false" name="z38349" swLiveConnect="true" quality="High" scale="exactfit" bgcolor="#333333" allowScriptAccess="sameDomain" WIDTH="800" HEIGHT="600" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT> The only direct way you can manipulate this through the IE document object model is by changing or setting "PARAM" values on that object... what you are able to do is totally up to the person who wrote the flash object and what they expose through that interface. Your only sure-fire approach will be to use SEND or CONTROLSEND to send keystrokes to the browser. Dale Edit: typo Edited June 18, 2007 by DaleHohm 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