Jump to content
Sign in to follow this  
arcticpup

Web Form filler

Recommended Posts

arcticpup

Hi,

Just posting this in case anyone has done something similar so didn't want to try re-inventing the wheel....

We have an internal tracking system which has 3 fields to fill.

I have today been presented with an Excel spreadsheet with over a thousand rows that I need to extract, populate 3 fields on a web page, submit and reload the form and onto the next one.

Does anyone have a suggestion as to the best way of going about this?

To be honest, the bit I am more stuck on is to iterate through the rows then repeat the process for the next one. Last time I did this was in BBC Basic with a GOTO command! LOL

Many thanks

Share this post


Link to post
Share on other sites
Lars

Hii,

How I would do it,

Convert your exelsheet to a CSV, and load the CSV into your autoit script.

Parse the csv Values, post em to your server with the IE component.

like http://myserver/index.php?lol=val1%lol2=val2

Create a big loop and the jobs almost done.

I lately used this system for a dentist who changed software, my script took 1,5 hour to complete

but the job was done :D

suc6

Share this post


Link to post
Share on other sites
arcticpup

Hii,

How I would do it,

Convert your exelsheet to a CSV, and load the CSV into your autoit script.

Parse the csv Values, post em to your server with the IE component.

like http://myserver/index.php?lol=val1%lol2=val2

Create a big loop and the jobs almost done.

I lately used this system for a dentist who changed software, my script took 1,5 hour to complete

but the job was done :D

suc6

Hmmmm sounds good, but can it be done in ASP?

Here is what I have so far

#include <IE.au3>
$oIE = _IECreate ("http://its-server/ITS/addcontact.aspx")
_IELoadWait ($oIE)
$oForm = _IEGetObjByName ($oIE, "ResellerContact")
_IEFormElementSetValue ($oForm, "E-mail address")
$oForm1 = _IEGetObjByName ($oIE, "Reseller")
_IEFormElementSetValue ($oForm1, "Account number")
$oForm2 = _IEGetObjByName ($oIE, "Customer")
_IEFormElementSetValue ($oForm2, "Customer")
Sleep(50)
_IENavigate ($oIE, "http://its-server/ITS/addcontact.aspx")

Pretty vague I know, but after a few basic apps, this is really my first dabble with web pages.

So, I know I need to read my CSV file into an array, to populate my values, but how do I get the values from that? I presume filereadline is the wrong way to go?

Edited by arcticpup

Share this post


Link to post
Share on other sites
oMBRa

look in the help file for excel function, especially _ExcelReadArray

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.