logi Posted September 19, 2006 Share Posted September 19, 2006 Hello everyone, Just starting to script so i need your help , I was looking at the function _IE but couldn't figure out how it worked.. I want to log-in at www.ogame.nl, is this possible with _IE ? and if it is, how could i do it? Link to comment Share on other sites More sharing options...
Bert Posted September 19, 2006 Share Posted September 19, 2006 If you are using IE as your web browser, it is possible. You will have to experiment! If you plan to use Firefox, then no. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Rick-O-Shea Posted October 26, 2006 Share Posted October 26, 2006 Logi, Have you pulled it off yet? Post your OGame name and UNI and I'll get back to you... Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 26, 2006 Share Posted October 26, 2006 Hi, start with: #include <IE.au3> $sUsername = "Username" $sPassword = "Password" $sUrl = "http://www.xxx.xx" $oIE = _IECreate ($sUrl) $oHWND = _IEPropertyGet($oIE, "hwnd") WinSetState ($oHWND, "", @SW_MAXIMIZE ) $oForm = _IEFormGetCollection ($oIE, 0) $oUsername = _IEFormElementGetObjByName ($oForm, "username") $oPassword = _IEFormElementGetObjByName ($oForm, "password") _IEFormElementSetValue ($oUsername, $sUsername) _IEFormElementSetValue ($oPassword, $sPassword) _IEFormSubmit ($oForm) So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
chie Posted November 8, 2006 Share Posted November 8, 2006 MegaHelp file example does not work & this does. Great thanx. But I have a question take alook at this, if it finally opens the page & logs in, Nothing works anymore(if i press close button or any other one nothing happens) any idea why ? expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change GUI to OnEvent mode $mainwindow = GUICreate("LAbel", 400, 90) ; main GUI window $write_INI_button = GUICtrlCreateButton("login", 5, 34, 50, 20) ;Browse Button GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; if u close GUI it will exit GUICtrlSetOnEvent($write_INI_button, "Write_ini_func") ; so if u press save then save function is called- GUISetState(@SW_SHOW) ; makes Gui Visible ;~ ------------------------------------------------------------------------------------------ Func Write_ini_func() $oIE = _IECreate ("http://www.rate.ee/show.php",1) sleep(1000) $o_form = _IEFormGetObjByName ($oIE, "loginform") $o_user = _IEFormElementGetObjByName ($o_form, "username") $o_password = _IEFormElementGetObjByName ($o_form, "password") $username = "user" $password = "pass" ; Set field values and submit the form _IEFormElementSetValue ($o_user, $username) _IEFormElementSetValue ($o_password, $password) _IEFormSubmit ($o_form) EndFunc ;~ ------------------------------------------------------------------------------------------ Func CLOSEClicked() ;Exit GUI function Exit EndFunc While 1 Sleep(100) ; Just idle around WEnd Link to comment Share on other sites More sharing options...
jvanegmond Posted November 8, 2006 Share Posted November 8, 2006 (edited) I got so fed up with repeatedly doing this, I created a little automation to write the script for you.I call it Form Inspector. Edited November 8, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
chie Posted November 9, 2006 Share Posted November 9, 2006 I got so fed up with repeatedly doing this, I created a little automation to write the script for you.Its till the same, even with that generated script, after it loggs in the webpage, the Gui stops reacting on anay action. Link to comment Share on other sites More sharing options...
chie Posted November 9, 2006 Share Posted November 9, 2006 Its till the same, even with that generated script, after it loggs in the webpage, the Gui stops reacting on anay action.BUMP* Well it took hours of forum serching but I guess This seems to solve the problem I added 5 lines(I dont really understand the meaning of some lines I added, So dont ask me.... but it seems to be working now.) The console still gives a Warning:(I dont think it bad though... ) Eather way hire is the code: --> IE.au3 Warning from function _IEAttach, $_IEStatus_NoMatch expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change GUI to OnEvent mode AutoItSetOption("WinTitleMatchMode", 2) ;ADDED line---<<<<<<<<<<<<<<<<< $mainwindow = GUICreate("LAbel", 400, 90) ; main GUI window $write_INI_button = GUICtrlCreateButton("login", 5, 34, 50, 20) ;Browse Button GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; if u close GUI it will exit GUICtrlSetOnEvent($write_INI_button, "Write_ini_func") ; so if u press save then save function is called- GUISetState(@SW_SHOW) ; makes Gui Visible ;~ ------------------------------------------------------------------------------------------ Func Write_ini_func() $oIE = _IECreate ("http://www.rate.ee/login.php",1) $wintitle = "Rate.ee" ;ADDED line---<<<<<<<<<<<<<<<<< winwait($wintitle) ;ADDED line---<<<<<<<<<<<<<<<<< WinSetState($wintitle,"", @SW_MAXIMIZE) ;ADDED line---<<<<<<<<<<<<<<<<< $o_form = _IEFormGetObjByName ($oIE, "loginform") $o_user = _IEFormElementGetObjByName ($o_form, "username") $o_password = _IEFormElementGetObjByName ($o_form, "password") $username = "user" $password = "pass" ; Set field values and submit the form _IEFormElementSetValue ($o_user, $username) _IEFormElementSetValue ($o_password, $password) _IEFormSubmit ($o_form) _IELoadWait ($oIE) ;ADDED line---<<<<<<<<<<<<<<<<< EndFunc ;~ ------------------------------------------------------------------------------------------ Func CLOSEClicked() ;Exit GUI function Exit EndFunc While 1 Sleep(100) ; Just idle around WEnd 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