I am trying to make a program to automatically login to my website it will do this by loading a WebBrowser and navigating to the login page of my site then I want it to edit the value of the username and password box.
I just do not know how to do this in Delphi. I have a working version of this program made in VB and the command is...

WebBrowser1.Document.All("username").Value = "Username Here"

But that will not work in Delphi.
I hope someone can help me with this.

Why doesnt it work? Remember that "username" will be case sensitive.

Why doesnt it work? Remember that "username" will be case sensitive.

Well when I try to use that code I just get this error...

[Error] a.pas(312): Undeclared identifier: 'All'

Try WebBrowser1.oleobject.document.all ..

Try WebBrowser1.oleobject.document.all ..

When I try that I get...

---------------------------
Debugger Exception Notification
---------------------------
Project main.exe raised exception class EOleSysError with message 'Not implemented'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------

Im guessing username is in a form? then you'd need to go through the whole document tree, eg forms etc

and how would I do that on a website like...

http://www.aitsafe.com/mtracker/

because if I try...

WebBrowser1.oleObject.Document.All('username').Value:='KTF';

I get the same Error

Because you didnt change your code...
You need to look through the elements available, most likely rather than "All" you probably want forms..

It depends a lot on the html

Because you didnt change your code...
You need to look through the elements available, most likely rather than "All" you probably want forms..

It depends a lot on the html

Oh I just copied the wrong line of code I had changed it to .Form and the .Forms I have tried every thing that I could think of and still it gives me the error.
Well I guess I will try some other sites also to see if anyone can help me.

Well the Forms part has always worked for me, however, it may vary with delphi versions, as well as the HTML you have.. so.. you need to debug it. That always has the answers

Well the Forms part has always worked for me, however, it may vary with delphi versions, as well as the HTML you have.. so.. you need to debug it. That always has the answers

Yeah I am using Delphi 7.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.