Jump to content

Creating router management program, 1 question


Recommended Posts

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 Posted Image

Damian666

Edited by damian666
and proud of it!!!
Link to comment
Share on other sites

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

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

#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()
Exit

If 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...