Aprilgogo Posted June 23, 2008 Share Posted June 23, 2008 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 More sharing options...
LarryDalooza Posted June 23, 2008 Share Posted June 23, 2008 http://www.autoitscript.com/forum/index.ph...st&p=458286 AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Aprilgogo Posted June 24, 2008 Author Share Posted June 24, 2008 http://www.autoitscript.com/forum/index.ph...st&p=458286Hi 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=0Could 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 More sharing options...
LarryDalooza Posted June 24, 2008 Share Posted June 24, 2008 (edited) 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=0Could 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 June 24, 2008 by LarryDalooza AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
LarryDalooza Posted June 24, 2008 Share Posted June 24, 2008 Try that zip again... I edited it because the code reversed KeyDown,KeyUp... Lar AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now