Jump to content

WM_KEYUP message in hook.dll


Recommended Posts

Hi,

I downloaded Larry's hook.dll (thanks Larry!) and runs the MouseHook.au3 script. But the script can't capture the WM_KEYUP message. So I checked the original dll.c code and found:

in function:

LRESULT CALLBACK KeyProc( int nCode, WPARAM wParam, LPARAM lParam

{

......

if (lParam & 0x80000000)

PostMessage(m_hHwndKey, AU3_WM_KEYDOWN, wParam, iState);

else

{

PostMessage(m_hHwndKey, AU3_WM_KEYDOWN, wParam, iState);

}

......

}

I think one of the red part should be AU3_WM_KEYUP. One can also check the behavior of the MouseHook.au3: when a key is pressed and released, two identical message shows in the tooltip.

Could someone please:

1. I download hook.dll in some part of the forum (sorry I forgot the link). If there is a correct version of hook.dll, could you please tell me the link?

2. I don't have a MS VC++ installed. If there is not a correct version of hook.dll, could you please build one and provide the link?

3. Is it possible to implement dll.c in AutoIt3 script?

Thank you, guys!

Link to comment
Share on other sites

Hi Larry,

Thanks for the reply. But what I mean is the WM_KEYUP typo, not the WM_MOUSEWHEELUP typo.

Anyway, I found a VC++ machine, corrected the code and posted here:

http://www.autoitscript.com/forum/index.ph...=53215&st=0

Could you please recompile the code and provide the fixed dll in your original post? Thank you!

BTW, I tested some keys on my keyboard and found that the script did not get a WM_KEYDOWN message when the "PrintScreen" is pressed but got a WM_KEYUP message when "PrintScreen" is released. Why does this happen?

Link to comment
Share on other sites

Hi Larry,

Thanks for the reply. But what I mean is the WM_KEYUP typo, not the WM_MOUSEWHEELUP typo.

Anyway, I found a VC++ machine, corrected the code and posted here:

http://www.autoitscript.com/forum/index.ph...=53215&st=0

Could you please recompile the code and provide the fixed dll in your original post? Thank you!

BTW, I tested some keys on my keyboard and found that the script did not get a WM_KEYDOWN message when the "PrintScreen" is pressed but got a WM_KEYUP message when "PrintScreen" is released. Why does this happen?

Some keys act funny... When I wrote the scriptwriter I noticed quarkiness with PRINTSCREEN and TAB+MODIFIER and others too I think.

This attachment has been changed to work with the latest PellesC...

Lar.

hook.zip

Edited by LarryDalooza

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...