damian666 Posted August 1, 2009 Share Posted August 1, 2009 (edited) so, i have written a program to acces my router, and all works fine.EXCEPT, i use a IE object in a GUI, and it shows the page fine, but only after i have accesed the router page manually once, and told it to remember my credentials.i tracked it down to the popup window thats shown when you first enter the page, a IE object doesnt show these.so, my question is, how can i get that popup to show, or better yet, how can i send the username and pass directly to the routerpage so it logs in immidiatly??any help is appriciated Damian666 Edited August 1, 2009 by damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
damian666 Posted August 2, 2009 Author Share Posted August 2, 2009 bump? Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
BrettF Posted August 2, 2009 Share Posted August 2, 2009 I think you mean:Function InetGethttp://myuser:mypassword@www.somesite.comCheers,Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
damian666 Posted August 2, 2009 Author Share Posted August 2, 2009 yeah, i know that one, its in the helpfile ^^ problem is, i cant direct that output to the IE window i created on my GUI :/ normally you use : _IENavigate ($oIE, "http://" & $router) but this has that popup, which isnt shown, and inetget doesnt work on a GUI... Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
BrettF Posted August 2, 2009 Share Posted August 2, 2009 Can't you use telnet or something? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
damian666 Posted August 2, 2009 Author Share Posted August 2, 2009 to be honest... i havent got a clue XD thats why i posted it here, thought some of the better members could help >_< i think im just done with it, guess it cant be done with a integrated IE object in my GUI, a shame really, looked so much better Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
Authenticity Posted August 2, 2009 Share Posted August 2, 2009 #include <IE.au3> Global $oIE = _IECreateEmbedded() Global $hGUI = GUICreate('', 600, 600) Global $IECtrl = GUICtrlCreateObj($oIE, 0, 0, 600, 600) GUISetState() _IENavigate($oIE, 'http://user:pass@192.168.1.1/') Do Until GUIGetMsg() = -3 GUIDelete() ExitIf you want to manipulate your router automatically without requiring the user to interfere you can use the "WinHttp.WinHttpRequest.5.1" object and send HTTP GETs or POSTs to the router page using the methods shown here. the methods of interests are Open(), Send() and SetCredentials(). You set the user and password using SetCredentials() after you've used Open() so specify the request and then just Send(). Hope I'm getting what you're saying. >_< Link to comment Share on other sites More sharing options...
damian666 Posted August 2, 2009 Author Share Posted August 2, 2009 no, its not about working my router without interacting, just a simple and easy way to gain acces to it, thats all >_< also, i retrieve router IP on runtime, and have 2 txtboxes where i can put my user and pass in, that will be send to the appropriate router adres. thanx for that snippet of code, im trying it now, ill report back, regardless if it worked or not Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
damian666 Posted August 2, 2009 Author Share Posted August 2, 2009 damn that was a easy fix mate >_< thanx alot all of you who took the time to help me ^^ it works flawlessy now... xD Damian666 and proud of it!!! Link to comment Share on other sites More sharing options...
damian666 Posted August 2, 2009 Author Share Posted August 2, 2009 ok, so just 1 more then, is there a way to retrieve the state of the login? like, can i determine by a code or whatever if logon was succesfull, and if not, why? Damian666 and proud of it!!! 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