Results 1 to 12 of 12

Thread: SendKeys - Windows Message {Now Resolved, but, Freaky Update}

  1. #1

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    SendKeys - Windows Message {Now Resolved, but, Freaky Update}

    Hey all, this will be a different question from your normal SendKeys questions, but does anyone know for sure which Windows Messages SendKeys uses? The best I can find is that it uses WM_KEYDOWN/CHAR/KEYUP.

    Is this accurate?
    Last edited by Spajeoly; Jan 5th, 2006 at 07:29 AM.

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: SendKeys - Windows Message

    May be the SendInput API ?

  3. #3

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message

    No, that is not what I am looking for. SendKeys uses Window Messages to put the desired text into a text field, I am sure the ones I have listed are correct. I was just wondering if anyone here had some different information.

    Thanks.

  4. #4

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message

    Just to give more information, I need this information to know whether or not it is possible to block SendKeys from placing text into the textbox of a program.

    So if anybody knows if the messages are different, please let me know.

    Thanks.

  5. #5
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: SendKeys - Windows Message

    You still want the user to be able to edit info, but just block sendkeys?

  6. #6

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message

    That is the idea, my friend and I are testing it now. Just as an FYI I will post the results here. I fear that I am right and inthat case, will not be able to block SendKeys withing blocking keyboard input.

  7. #7

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message {Now Resolved}

    Success! It turns out there is a slight difference between SendKeys and an actual keyboard event...

    If you're actually typing, it goes WM_KEYDOWN WM_CHAR WM_KEYUP.... yet, sendkeys does those three as WM_KEYDOWN WM_KEYUP WM_CHAR

    So, it can be singled out and blocked. Thanks for your help David & Prank.

  8. #8

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message {Now Resolved Freaky Update}

    Odd, it turns out the original finding of the WM_ Messages being out of order from a normal keystroke was a one time fluke or an every now and then fluke. 99.9999% of the time the WM_ Messages are identical to a keystroke form the keyboard.

    Just thought I would share.

  9. #9
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: SendKeys - Windows Message {Now Resolved Freaky Update}

    Quote Originally Posted by Spajeoly
    Odd, it turns out the original finding of the WM_ Messages being out of order from a normal keystroke was a one time fluke or an every now and then fluke. 99.9999% of the time the WM_ Messages are identical to a keystroke form the keyboard.

    Just thought I would share.
    What OS did you test this under? I wonder if this is true across all Windows operating systems.

  10. #10

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message {Now Resolved, but, Freaky Update}

    Sorry for the delay, Hack. This was Windows XP tested only.

  11. #11
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: SendKeys - Windows Message {Now Resolved, but, Freaky Update}

    Are you still looking for a solution to this?

    If you sink a low-level keyboard hook then you can distinguish between the user pressing the keyboard (which will be registered by the hook) or using SendKeys (which won't register) - more info: http://www.codeguru.com/vb/gen/vb_sy...icle.php/c4829

  12. #12

    Thread Starter
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068

    Re: SendKeys - Windows Message {Now Resolved, but, Freaky Update}

    Well, I don't know as it was resolved other ways... But thanks for the link, Bush. I am not sure my friend is looking to do a keyboard hook. Who knows though, he is a bit insane when it comes to his coding.

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