We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
Help to auto complete web form - Batch file or script??

--Tony--
Posts: 1,752 Forumite


in Techie Stuff
There is a web page I need to keep completing with the same information.
Is there a way to auto complete the form with some kind of batch file or script. I use a batch file now to open several IE sessions at once but I don't think you can use dos commands to do what I'm looking for?
I know the simple way would be to download form filling software or a toolbar but its a work PC and I can't do that.
The form in question does not save in microsoft auto-complete either, I think the form may be in java as when you click submit the web page does not move on, ie you can't click back to go back you can only click refresh to start again.
Any ideas welcome.
Is there a way to auto complete the form with some kind of batch file or script. I use a batch file now to open several IE sessions at once but I don't think you can use dos commands to do what I'm looking for?
I know the simple way would be to download form filling software or a toolbar but its a work PC and I can't do that.
The form in question does not save in microsoft auto-complete either, I think the form may be in java as when you click submit the web page does not move on, ie you can't click back to go back you can only click refresh to start again.
Any ideas welcome.
.
0
Comments
-
Hi, any chance you can point us towards this form to take a look?
I would suggest using visual basic with the webbrowser control. Setting the focus to each text box one by one and inputting the text required.
This tends to work only with standard html forms.0 -
Sorry I can't point you to it as it on our network thats why I have to use the work computer to get to it.
Thanks Tony.0 -
Ok, are you familiar with visual basic at all?0
-
I am a little but only really with macros in excel.0
-
You can use scripting (JScript, VBScript etc.) to automate Internet Explorer. The script opens IE, loads the URL, accesses the HTML document and manipulates its content, for example by filling in form field data.
There is an example of the technique here, with a sample HTML page and VBScript code to populate the form fields. It's for IE4, but should work for IE6.
I've knocked up the following code to populate the search box on https://www.moneysavingexpert.com. Open Notepad, copy and paste the code below and save the file as IEpopulateField.vbs. Double-click IEpopulateField.vbs to run it.'IEpopulateField.vbs 'Populates a form field Option Explicit On Error Resume Next Dim url, ie url = "www.moneysavingexpert.com" Set ie = WScript.CreateObject("InternetExplorer.Application", "ie_") ie.Visible = true ie.Navigate url 'Wait for page to load Do While ie.Busy Or ie.ReadyState = 1 Loop 'Write value in the HTML form field named 'string' ie.Document.all("string").value = "Martin Lewis" sub ie_onQuit WScript.Quit end sub
0 -
Thank you so much for that I will have a play in the morning.
Fantastic!.0 -
Thanks for helping, having tried and looking at the source, the form is flash (form.swf) and as the text fields are not listed there is no location to tell it to put the text in.
I guess this makes it a lot harder.
Out of interest hitting the tab key puts the curser in the first box. If there was a way to do this:
Tab
write text
tab
write text
etc etc
It would do the trick..0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.1K Banking & Borrowing
- 252.8K Reduce Debt & Boost Income
- 453.1K Spending & Discounts
- 243.1K Work, Benefits & Business
- 597.4K Mortgages, Homes & Bills
- 176.5K Life & Family
- 256K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards