Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Launch a hook at QM start
#1
Hi Gintaras, hi all,

I (as far as my tests continue) am likely to clone an old favorite of mine, TapTap (http://www.donationcoder.com/Software/Mouser/TapTap/).

I use a hook function derivated from Gintaras example (LL keyboard hooks).

Function TapTap contains the hook, SetWindowsHookEx(WH_KEYBOARD_LL &TapTapProc _hinst 0)
TaptapProc handles the keyboard events.

I want the main function which contains the hook to launch and be active for QM life. The message trick
in LL keyboard hooks is obviously not an option there.

I'm stuck there, can you help?

Thanks.
#2
Look in Properties / Triggers / QM.
#3
Does not work, the function should be monitoring keyboard, you know that better then me,
so I must have it staying loaded in memory, putting it to start with QM just launch it,
and then ends.

I don't want to use a rep function there, and need something as MessageLoop in tray functions....

I did that, not very elegant, i'm sure there is a better way...

SetWindowsHookEx(WH_KEYBOARD_LL &TapTapProc _hinst 0)
str+ Ancienne
int+ TempsAncien
wait 0 WP "QM"
#4
If example was with a message box, look for examples with message loop or wait function.

MessageLoop
or
opt waitmsg 1; wait -1
#5
Or can I keep my wait function code, what is the most efficient/light in resources,cpu??


edit: (forget that nonsense).....

opt waitmsg 1; wait -1
worked well, thanks
#6
Can use any form of wait function, but if don't need to wait for something, better use MessageLoop or wait -1. With wait need opt waitmsg 1.
#7
opt waitmsg 1; wait -1 is perfect. Thanks.
#8
Just a precision:

Indeed, i have a general launch macro at QM startup, and TapTap now.

As I launch several program at QM launch (mostly configuration tweaks or external program
launch), I have an warning message that "a macro use similar trigger".


But launching taptap function from my first QM start trigerred macro does not work, even with
opt waitmsg in it.
#9
Ignore the "similar trigger" message. This trigger can launch many functions and 1 macro.


Forum Jump:


Users browsing this thread: 1 Guest(s)