Results 1 to 7 of 7

Thread: repeat button

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    87

    repeat button

    i am using vb6.0
    i have a webbrowser, and when someone clicks a button on a page in the webbrowser i want to be able to simulate pressing that button, maybe by:
    VB Code:
    1. WebBrowser1.Document.forms(form).submit (buttonvalue)
    is there anyway of doing this, i though of maybe finding out the form the button is on and the value of the button when they click it, is there any way i could do this?
    or any easy way of the user telling the program the form and button value?

    thanks for any help.

  2. #2
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    Code:
    WebBrowser1.Document.FormNameHere.Submit

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    87
    what if there were two buttons though, or more?
    and how is the program supposed to know the form name?

    is there any source code maybe for a web page macro form completer, as this is the sort of thing i want, so that the program knows what button to press after the user presses it once.

  4. #4
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    What are you trying to achive?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    87
    automatically pressing a button on a website,
    sendkeys doesnt do this in the background,
    sendmessage you need the hwnd or whatever,
    the best way i know is as i first posted; but it is complicated for the user to get the value of the button and what form it is, so i was hoping there was a way for the program to find this out when the user clicks the button... is this possible?

  6. #6
    Frenzied Member andreys's Avatar
    Join Date
    Sep 2002
    Location
    Los Angeles
    Posts
    1,615
    Originally posted by dave555
    automatically pressing a button on a website,
    On what event? On open web site, load?

    I still can't get what you need that for. User could click on any button on WebBrowser's page at any time and it will execute whatever that button should do on the web site.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 2002
    Posts
    87
    does it matter what event?
    if it does, take is to be when the website loads,
    the program is like a macro and it enables buttons to be pressed etc.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width