10-05-2005, 09:03 AM
;/
function nCode wParam KBDLLHOOKSTRUCT*lParam
if(nCode>=0)
,if(lParam.flags&16=0 and !__bitempunblock and !(__bihwnd and __bihwnd!=win)) ;;not ijected, not unblocked, ...
,,;allow certain keystrokes
,,sel lParam.vkCode ;;virtual-key code
,,,case 'A' if(GetMod=2) key Ca ;;resend Ctrl+A
,,,case VK_F5 if(GetMod=0) key F5 ;;resend F5
,,,;case ...
,,,case 'P'
,,,if(GetMod=2)
,,,,BlockInput2 0 ;;end blocking when Ctrl+P pressed
,,,,;Also should somehow end or notify the macro that called BlockInput2 and now is waiting.
,,,,;For example, the macro can wait for a global variable, and here you can set it.
,,,
,,ret 1 ;;eat
ret CallNextHookEx(__bikhook nCode wParam lParam) ;;don't eat