To open a URL using batch file and enter data

A

ankan

Hi Guys,
I admit I am a novice using batch files for opening URL's. The
challenge I have is after opening the URL, I have to enter some text in
a textbox in that URL.

Does anybody has any idea how to enter text in a textbox using a
bath file ? I need to mention that the cursor focus , after opening the
URL, is not on the text box.So, the program ideally should move the
focus to the text box afer opening the URL and then enter text in that
textbox.
Has anybody done something like this before ?
Is there a solution to this challenge I am facing ?

I am desperately looking up to you guys in search of an answer.

----------------------------------------------------------------------------------------------------------
 
P

Paul R. Sadowski [MVP]

Hello, ankan!
You wrote on 3 Jul 2006 05:17:39 -0700:

a> Hi Guys,
a> I admit I am a novice using batch files for opening URL's. The
a> challenge I have is after opening the URL, I have to enter some text
a> in a textbox in that URL.

a> Does anybody has any idea how to enter text in a textbox using a
a> bath file ? I need to mention that the cursor focus , after opening
a> the
a> URL, is not on the text box.So, the program ideally should move the
a> focus to the text box afer opening the URL and then enter text in
a> that textbox.
a> Has anybody done something like this before ?
a> Is there a solution to this challenge I am facing ?

a> I am desperately looking up to you guys in search of an answer.

It's easy to do with VBScript.
Something like
Const READYSTATE_COMPLETE = 4

Set IE = CreateObject("INTERNETEXPLORER.APPLICATION")
IE.Visible = true
IE.navigate "http://whatever/"

Do While IE.Busy Or IE.readyState <> READYSTATE_COMPLETE : Loop

IE.document.forms(0).Email.value="(e-mail address removed)"
IE.document.forms(0).null.Click

You may have to use getelementbyid like
IE.document.getelementbyid("VideoPlayback")

The difficult part for you, maybe, will be studying the page source to get
the info you need to fill in the form.

With best regards, Paul R. Sadowski [MVP]. E-mail: (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top