Fw: [Wylug-help] Fw: Automate Web logins

Idris Fulat idrisfulat at hotmail.com
Tue Jun 29 16:20:07 BST 2004


This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
so we can't do attachments? oh well here it is...
Dim ie As InternetExplorer
Private Sub Form_Load()
Set ie = New InternetExplorer
On Error GoTo IeErrorhandler
With ie
    .navigate "www.intra.leedslearning.net"
    Do Until .readyState = READYSTATE_COMPLETE
        DoEvents
    Loop
    .document.All("username").Value = "XXXXXX"
    .document.All("password").Value = "XXXXX"
    .Visible = False
    For n = 0 To .document.Forms("loginform").length - 1
        If .document.Forms("loginform").Item(n).Value = "Login" Then
            .document.Forms("loginform").Item(n).Click
        End If
    Next
End With
    ie.Quit
IeErrorhandler:
Resume Next
    Form1.Hide
    Set Form1 = Nothing
    End
End Sub
----- Original Message -----
From: "Idris Fulat" <idrisfulat at hotmail.com>
To: <wylug-help at wylug.org.uk>
Sent: Tuesday, June 29, 2004 4:09 PM
Subject: Re: [Wylug-help] Fw: Automate Web logins


> This is a multi-part message in MIME format.
> --
> Smylers and James...My job is changing ALOT very soon so I'm not going to
> have time to 'play' anymore. Thanks for both your replies but to be really
> honest it was begining to feel a bit beyond me. Having said this I'm told
> I'll be getting experience with some Unix boxes so you never what I'll be
> doing!!
> Smylers...
> > > The login page I guess you're think of, however, ...
> >
> > Oh, I hadn't realized we were supposed to be playing guess-the-webpage.
> > Is there a prize for whoever gets closest?
>
> I work where James used to work so he knows more than I do about the login
> page. I manage some of the linux things he set up here and to be honest if
> it wasn't for him I would not have know hardly anything about Linux nor this
> user group. (I've been dual booting at home and all sorts since...). Again
> thanks for the replies.
>
> Idris
>
> PS.. just out of interest my VB code opens IE 'looks' for the login and
> password fields, fills them in and then submits and then closes IE (its like
> a background task without actually showing the IE window so the user
> continues with their IE session). This then continues to happen every ten
> minutes via the task schedular. The linux alternatives seem awfully
> complicated from my point of view. Is it not possible for 'something' to
> call mozilla 'look' for the fields and fill and submit. None of this hidden
> ID and cookies etc. I know it seems like I'm asking just for the sake of it
> but I really thought it would have been a much simpler process. I've
> attached the VB code if you're interested.
>
> ----- Original Message -----
> From: "Smylers" <Smylers at stripey.com>
> To: <wylug-help at wylug.org.uk>
> Sent: Saturday, June 26, 2004 10:48 PM
> Subject: Re: [Wylug-help] Fw: Automate Web logins
>
>
> > James Holden writes:
> >
> > > The username and password need sending via a HTTP POST request, so you
> > > could use 'lynx' to send the form data via it's -post_data option.
> > >
> > > The login page I guess you're think of, however, ...
> >
> > Oh, I hadn't realized we were supposed to be playing guess-the-webpage.
> > Is there a prize for whoever gets closest?
> >
> > > has a unique number in it every time it's issued to nobble people
> > > trying to do what you're trying to do.
> > >
> > > IIRC there's also a cookie involved.
> >
> > If you need to use post, a per-session hidden parameter, and a cookie,
> > then it's almost certainly simpler to use WWW::Mechanize (possibly via
> > HTTP::Recorder) than hooking all the bits together yourself.
> >
> > Smylers
> >
> >
> > _______________________________________________
> > Wylug-help mailing list
> > Wylug-help at wylug.org.uk
> > http://list.wylug.org.uk/mailman/listinfo/wylug-help
> >
> --
> Dim ie As InternetExplorer
>
> Private Sub Form_Load()
> Set ie = New InternetExplorer
> On Error GoTo IeErrorhandler
> With ie
>     .navigate "www.intra.leedslearning.net"
>     Do Until .readyState = READYSTATE_COMPLETE
>         DoEvents
>     Loop
>     .document.All("username").Value = "XXXXXX"
>     .document.All("password").Value = "XXXXX"
>     .Visible = False
>     For n = 0 To .document.Forms("loginform").length - 1
>         If .document.Forms("loginform").Item(n).Value = "Login" Then
>             .document.Forms("loginform").Item(n).Click
>         End If
>     Next
> End With
>     ie.Quit
> IeErrorhandler:
> Resume Next
>     Form1.Hide
>     Set Form1 = Nothing
>     End
> End Sub
> --
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> http://list.wylug.org.uk/mailman/listinfo/wylug-help
>
--




More information about the Wylug-help mailing list