[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 148
  • Last Modified:

Automatically click web page links or submission buttons

I'm assuming this is best done with an HTTP control of some sort, but I would like to have my visual basic application go to a web site submission form that I've created, fill it out, then submit it. Anyone have any ideas?
0
microfleet
Asked:
microfleet
  • 4
  • 2
1 Solution
 
mcriderCommented:
You can do this with the Microsoft Internet Control.  To add this to your project, right-click the toolbar (the window with the textbox, listbox, label, etc.) and select "Components..."

Then select "Microsoft Internet Control" from the list.

You can then do something like this:


    WebBrowser1.Navigate "http://www.yourdomain.com/cgi-bin/showvar.cgi?Arg1=aaa&Arg2=bbb"


Where everything in the quotes before the question mark is the URL and everything after the question mark are arguments to be passed.

The format for an argument is:

   arg=value

You separate multiple arguments with a & (ampersand character).

Hope this helps!


Cheers!
0
 
mcriderCommented:
To give you an example, let's say this is the html code on the form you're filling out:

      <form method="get" action="/cgi-bin/myscript.cgi">
      <input type="text" name="uname" value="">
      <input type="text" name="upwd" value="">
      <input type="submit" name="Login" value="Login">
      </form>


This is what you could do:

Dim UserName As String
Dim Password As String

UserName = "mcrider"
Password = "noneofyourbusiness"

WebBrowser1.Navigate "http://www.yourdomain.com/cgi-bin/myscript.cgi?uname=" & UserName & "&upwd=" & Password & "&Login=Login"


Cheers!




0
 
microfleetAuthor Commented:
I'll give you the points only because I think I have asked the wrong question. I have reposted the question I most wanted. As for your reply, yea it is a good way to do it, I on the hand POST to a perl script in about the same way. You can use the navigate method, and pass the URL headers and information, then POST it to the script. However, like I said I didn't ask the right thing so with this question, I'm not going to get the right answer, but since you knew a good answer, I'll pass the points.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
mcriderCommented:
Ok, Please grade generously....


Cheers!
0
 
microfleetAuthor Commented:
Well I thought I already did this, but here goes again
0
 
mcriderCommented:
Thanks!
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now