Click to See Complete Forum and Search --> : Finding Buttons on Web Form


gjbilik
October 20th, 2005, 08:44 AM
Hi there!

I am writing a program to interface with a third party web form that has to be filled out multiple times per session. The form is basicly a 4 col by 12 row matrix of information with a radio button with 2 choices and 2 submit button options at the bottom. As of now I can write to the form from a delimited file filling in the 48 needed pieces of information using the SendInput API. I can also find where the caret is at start up, the form is userid-password protected so I require that the user place the caret in the first field, and using GetWindowsThreadProcessID, GetGUIThreadInfo, GetWindowRect, SetCursorPos and SendInput for mouse down and mouse up place the caret in the first field subsequent times through the form.

However, what I can't figure out is how to find the radio buttons or submit buttons on the form and then check or click on them to procedd with the CGI script on the server. I would like to get as much user activity out of the process. Can anyone provide information on how I can find these objects? I've tried EnumChildWindows with the Proc to view the child windows but that doesn;t provide the info. Also, I probably don't have a godd enough understanding of what a child window is.

Any help will be greatly appreciated.

Thanks.

Greg

PeejAvery
October 20th, 2005, 11:35 AM
It sounds as though you are writing this in Visual Basic. Is this correct?

If so, you could use an internet control to manipulate it. First, navigate the internet control to "view-source: URL". This will return the source as you can imagine. Now use Visual Basic to read that source. Insert the values you need and submit the form.

gjbilik
October 21st, 2005, 10:16 AM
Actually I'm using Liberty Basic which has pretty much the same functionality as VB. When I originally wrote my program I was only interested in filling out the form and letting the user submit the form copy the returned info go back to the form and use my program, which is waiting for them to write the next 48 fields. So, when I decided to move to the next step I used my existing code as a starting point instead of rethinking the process.

Thanks for the help.

Greg