PDA

Click to See Complete Forum and Search --> : I'm in desperate need of some help!


TienLung
Jul 26th, 2000, 12:41 PM
hey...

i'm trying to make a program that will generate accounts at a site like hotmail.com, without having to go through the rather boring process of typing in the info...

can someone plz explain how it would be possible to automate the process? As in, can I AUTOFILL the textboxes somehow?

And if so, is it possible to fill the info with random info from a file? Like, "Names" would be filled in with a name from a file such as names.txt...

the site i am trying to do this to uses the POST method.

So basically, as recap, i want to autofill textboxes on a website. If anyone knows how to do this and could explain, plz do.

Thanx

TienLung (OLDSTNICK on EFnet)

lenin
Jul 27th, 2000, 01:54 AM
Why not auto file them from the contents of a database?
i.e. create a recordset in ASP and retrieve records from say an Access database and then populate the form with the returned fields in the record.

Lenin

reeset
Jul 27th, 2000, 02:03 AM
Filling textboxes on a site is relatively easy as long as you know the name of all the elements on the page. (If they're unnamed, then you have a problem.) A pretty basic vbs script to do this would be something like the following:



Dim ie
Dim location
Dim sFirst, sLast,sState,sZip

sFirst="John"
sLast="Doe"
sState="22869"
sZip="99999"

Set ie=CreateObject("InternetExplorer.Application")

'This address probably changes (looks like there is an id
'so you will have to figure out how to extract this info
'if you are looking at Hotmail

location="http://www.hotmail.com/cgi-bin/register?_lang=&id=2&ct=964680256"

ie.navigate(location)

Do While ie.busy=true then
Loop

ie.document.body.regform.xfname.value=sFirst
ie.document.body.regform.xlname.value=sLast
ie.document.body.regform.xgeoid.selected.value=sState
ie.document.body.regform.xzip.value=sZip
'ie......... (And it goes on like this)
'Anyway you get the picture here
'You need to call and fill each value
'Then you would call the submit button


Anyway, this should give you a pretty rough idea of how to fill the textboxes.

If you are using the WebBrowser control in vb, you would just replace the ie with Webbrowser1 (or whatever you are calling it, and don't set the ie object.)

Hope this helps.

BFord
Aug 10th, 2000, 01:40 PM
i understand what you're doing here, but how do you find out the names of the elements on the web page?

Aug 10th, 2000, 02:37 PM
Try this:

http://www.vbsquare.com/articles/cgi/