realkiller Posted November 13, 2006 Share Posted November 13, 2006 why cant i login in this website using this script 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.tcniso.net",1) $wintitle = "TCNiSO Embedded Development Assembly Experts" ;ADDED line---<<<<<<<<<<<<<<<<< winwait($wintitle) ;ADDED line---<<<<<<<<<<<<<<<<< WinSetState($wintitle,"", @SW_MAXIMIZE) ;ADDED line---<<<<<<<<<<<<<<<<< $o_form = _IEFormGetObjByName ($oIE, "submit") $o_user = _IEFormElementGetObjByName ($o_form, "uname") $o_password = _IEFormElementGetObjByName ($o_form, "passwd") $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 Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
DaleHohm Posted November 13, 2006 Share Posted November 13, 2006 Why do YOU think you can't? What happens? What messages, if any are output to the SciTe console? 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...
realkiller Posted November 13, 2006 Author Share Posted November 13, 2006 thx for replying but i cant figure it out can you plz help me Remote 3.1 BetaRemote Media Player ControlUSB Security 1.2 Link to comment Share on other sites More sharing options...
DaleHohm Posted November 13, 2006 Share Posted November 13, 2006 thx for replying but i cant figure it out can you plz help meI need you to describe what you expect to happen and what happens instead. What error messages do you receive, if any. What have you done to try to troubleshoot it already?Please give me more than "This code doesn't work, how come?"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...
Moderators big_daddy Posted November 14, 2006 Moderators Share Posted November 14, 2006 Try this... expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> Opt("GUIOnEventMode", 1) ; Change GUI to OnEvent mode Opt("WinTitleMatchMode", 2) ; ADDED line---<<<<<<<<<<<<<<<<< $sUsername = "user" $sPassword = "pass" $mainwindow = GUICreate("Label", 400, 90) ; main GUI window GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit"); if u close GUI it will exit $write_INI_button = GUICtrlCreateButton("login", 5, 34, 50, 20) ;Browse Button GUICtrlSetOnEvent(-1, "Write_ini_func") ; so if u press save then save function is called- GUISetState(@SW_SHOW) ; makes Gui Visible While 1 Sleep(100) ; Just idle around WEnd Func Write_ini_func() $oIE = _IECreate("http://www.tcniso.net", 1, 1, 0) WinSetState(_IEPropertyGet($oIE, "hwnd"), "", @SW_MAXIMIZE) _IELoadWait($oIE) $oForm = _IEFormGetObjByName($oIE, "login") $oUser = _IEFormElementGetObjByName($oForm, "uname") $oPassword = _IEFormElementGetObjByName($oForm, "passwd") $oSumbit = _IEFormElementGetObjByName($oForm, "Submit") ; Set field values and submit the form _IEFormElementSetValue($oUser, $sUsername) _IEFormElementSetValue($oPassword, $sPassword) _IEAction($oSumbit, "click") _IELoadWait($oIE) EndFunc ;==>Write_ini_func ;~ ------------------------------------------------------------------------------------------ Func _Exit() ;Exit GUI function Exit EndFunc ;==>_Exit 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