Results 1 to 6 of 6

Thread: SendMessage to dos program under WXP

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2002
    Posts
    49

    SendMessage to dos program under WXP

    How can I send a text message to a dos program... program 'edit' for example... i just cant seem to send anything to it... no sendkeys doesnt do what i want...

    so far i got this:

    Code:
    Dim zatacka As Long, editx As Long
    zatacka = FindWindow(vbNullString, "Opdrachtprompt - edit")
    'editx = FindWindowEx(notepad, 0&, "edit", vbNullString)
    'Call SendMessageByString(editx, WM_SETTEXT, 0, Text1)
    Debug.Print zatacka
    Call PostMessage(zatacka, WM_KEYDOWN, &H61, 0)
    Call PostMessage(zatacka, WM_KEYUP, &H61, 0)
    it can find the hwnd but no text appears

  2. #2
    Fanatic Member seec77's Avatar
    Join Date
    Jan 2003
    Posts
    596
    probably dos programs don't work the same way as window progs, i don't think dos progs work on the sendmessage system, and the only reason you can find the hwnd is because windows emulates a dos window
    Best Regards,
    seec77

    If you helped me, cosinder yourself thanked.

    Get each and every Garfield strip here!
    Here you can get all Calvin & Hobes strips!
    Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!

    I am 33% addicted to Counterstrike. What about you?
    I am 23% addicted to Star Wars. What about you?
    I am 0% addicted to Tupac. What about you?

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2002
    Posts
    49
    yeah thats why i was trying to send it to the emulator...

  4. #4
    Fanatic Member seec77's Avatar
    Join Date
    Jan 2003
    Posts
    596
    what emulator?
    Best Regards,
    seec77

    If you helped me, cosinder yourself thanked.

    Get each and every Garfield strip here!
    Here you can get all Calvin & Hobes strips!
    Damn UComics! It was probably unprofitable for them to allow us to just download Garfield and Calving & Hobes strips... so they made folder indexing unallowed on their server!!!

    I am 33% addicted to Counterstrike. What about you?
    I am 23% addicted to Star Wars. What about you?
    I am 0% addicted to Tupac. What about you?

  5. #5
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Well, I've looked in to this for the last 20 minutes... and I guess the end result is gonna make you say 'Awww crud!'

    There doesn't seem to any easy way to do this. But here's some background on how these things run that should help:


    http://www.microsoft.com/msj/default...8/hood0898.htm

  6. #6
    Hyperactive Member BrianPaul's Avatar
    Join Date
    Aug 2007
    Posts
    294

    Re: SendMessage to dos program under WXP

    Check this out... it works for me.
    http://www.vbforums.com/showthread.php?t=614894

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