Results 1 to 4 of 4

Thread: href buttons

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    href buttons

    I am using SendMessage to click buttons on a windows it works ok for regular buttons but not for href <a> type buttons how do I click these?

    Thanks Steve

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: href buttons

    Quote Originally Posted by tgacomp View Post
    ... but not for href <a> type buttons
    HTML-created buttons are windowless (they have no hWnd). The SendMessage API thus won't work on them.

    Quote Originally Posted by tgacomp View Post
    how do I click these?
    Try the example here (which I found by searching the forum).
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2015
    Posts
    15

    Re: href buttons

    Thanks for that
    As its a program windows and not a web page would I use the handle of the parent window something like:
    X = IE.Document.getElementById("Handle of Program window")

    thanks, Steve

  4. #4
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: href buttons

    Quote Originally Posted by tgacomp View Post
    As its a program windows and not a web page ...
    Sorry, but I don't understand. What exactly is the type of button that you are talking about? If possible, can you please attach a screenshot of it? Also, why are you trying to click it anyway? What are you supposed to accomplish?
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

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