Results 1 to 4 of 4

Thread: Using SendMessage to populate a logon box...Need Help!

  1. #1
    brettalandis
    Guest

    Exclamation

    Okay,

    The logon box is in another application, which will be someday fully automated. It has 2 text boxes, username and password, and a couple button classes. Using sendmessage, I'm able to locate the first textbox and the first button. How do I tell it to move to the next textbox or button? I know i use ->

    retval = findwindowex(hWnd, 0, "Edit", vbNullString)

    That works great to find the first edit control, but I can't access the second one. Help??????????????

  2. #2
    Matthew Gates
    Guest
    Add another line of the same code.


    Code:
    retval = findwindowex(hWnd, 0, "Edit", vbNullString) 'first box - user name
    retval = findwindowex(hWnd, 0, "Edit", vbNullString) 'second box - password

  3. #3
    brettalandis
    Guest

    Talking

    Thanks!

  4. #4
    brettalandis
    Guest

    Thumbs up Better Way

    For any curious folks, I found a more efficient way to do this. Instead of:

    RetVal = findwindowex(hWnd, 0, "Edit", vbnullstring)

    use
    RetVal = findwindowex(hWnd, prev, "Edit", vbnullstring)

    where prev = the previous handle of a classmate. ex: another edit class window.

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