Posts: 175
Threads: 43
Joined: Jun 2004
I've been using QM 2.2.1.5 since its release and have no problems with it (Win XP). However in the last few days the triggers (keyboard, mouse, etc) will stop working every so often. I can get them back to normal by opening then closing the QM editor. They will continue to work for some amount of time then stop again. I have tested with both low level hooks enabled and disabled and it doesn't make a difference. I can't pin down exactly when they stop working. Any ideas I can try?
Matt B
Posts: 12,041
Threads: 140
Joined: Dec 2002
Possibly some macro overwrites qm memory used for triggers. Review your recent macros. Macros running in qm process (ie not as separate process) can easily overwrite qm memory using Windows API functions, share, operator [] (strings, pointers). Or a dll/COM component used in macros can do it.
Posts: 175
Threads: 43
Joined: Jun 2004
Thanks Gintaras. I have something in mind that might be the problem.
Matt B
Posts: 1,769
Threads: 410
Joined: Feb 2003
let us know what/if you find anything matt.
Posts: 175
Threads: 43
Joined: Jun 2004
Quote:...ings, pointers). Or a dll/COM component used in macros can do it.
Gintaras, once you said that it might be a COM component I thought it might the serial port activex control I just started using. I deleted the registration entry I made in init2 and rebooted. The problem still persists though. Is there a quick way to test triggers every few seconds in the background and only notify me on trigger failure so I can track this down. All triggers seem to be affected, but not toolbars.
Matt B
Posts: 12,041
Threads: 140
Joined: Dec 2002
How work triggers other than key/mouse/window/acc? I ask because these 4 triggers are in dll and use shared memory that I suspect may be corrupted.
Posts: 12,041
Threads: 140
Joined: Dec 2002
Run this function. It shows message box when triggers stop working.
Name: not important.
Trigger: (254) //FF_ttest
/Dialog_Editor
if(getopt(nthreads)>1) ret
int+ g_ttest
rep
,;press key (254)
,keybd_event 254 0 0 0
,keybd_event 254 0 2 0
,1
,
,;ignore if a modifier key is pressed because then the trigger don't work
,if(GetMod)
,,g_ttest=GetTickCount
,,continue
,
,;how much time since triggers worked last time?
,int td=GetTickCount-g_ttest
,
,if(td>5000) ;;5 s
,,bee+ "$windows$\Media\ringout.wav"
,,str s.format("Triggers stopped working at %s" _s.time("%X" "" -td/1000))
,,out s
,,s+"[][]This may be false positive. Click Retry to check again, or Cancel to stop checking. If after you click Retry this message box will appear again after 1 second, triggers actually don't work or QM is disabled."
,,if(mes(s "" "RCx")='C') ret
Also create this function.
Name: FF_ttest
Properties: 'filter function' checked
;/
function# iid FILTER&f
int+ g_ttest=GetTickCount
Posts: 12,041
Threads: 140
Joined: Dec 2002
Create this function.
Name: FF_ttest
Properties: 'filter function' checked
;/
function# iid FILTER&f
int+ g_ttest=GetTickCount
Then create and run this function. It runs all the time and shows a message box when keyboard triggers stop working.
Name: not important.
Trigger (paste into the Trigger field on the toolbar): (254) //FF_ttest
if(getopt(nthreads)>1) ret
int+ g_ttest
rep
,;press key (254)
,keybd_event 254 0 0 0
,keybd_event 254 0 2 0
,1
,
,;ignore if a modifier key is pressed because then the trigger don't work
,if(GetMod)
,,g_ttest=GetTickCount
,,continue
,
,;how much time since triggers worked last time?
,int td=GetTickCount-g_ttest
,
,if(td>5000) ;;5 s
,,bee+ "$windows$\Media\ringout.wav"
,,str s.format("Triggers stopped working at %s" _s.time("%X" "" -td/1000))
,,out s
,,s+"[][]This may be false positive. Click Retry to check again, or Cancel to stop checking. If after you click Retry this message box will appear again after 1 second, triggers actually don't work or QM is disabled."
,,if(mes(s "" "RCx")='C') ret
Posts: 1,769
Threads: 410
Joined: Feb 2003
i had this go off for me this morning just a second or two after a 2nd keyboard trigger failed. is there a way i can narrow down some more info? i get 5-10 key trigger failures from the 2ndy keyboard a week or so.
Posts: 12,041
Threads: 140
Joined: Dec 2002
no I think it is not related.
Posts: 1,769
Threads: 410
Joined: Feb 2003
Posts: 175
Threads: 43
Joined: Jun 2004
Thanks for the help Gintaras. I installed and ran the test code you posted. I get triggers failed message as soon as the code is run. I continue getting the message after clicking "Retry". Also the time is always 4:49:40PM or 4:49:41PM. Any ideas? Thanks. Maybe I should try reinstalling QM?
Matt B
Posts: 1,271
Threads: 399
Joined: Mar 2003
my first thought was that it is somehow related to the serial port activex control.
unless you have changed the system qml,
you could try to start qm from an older backup
in '$my qm$\backup'
Posts: 12,041
Threads: 140
Joined: Dec 2002
While keyboard triggers work, the function must run silently. Maybe incorrectly installed. The function periodically presses key whose virtual key code is 254. The function also has trigger for this key. QM triggers should catch the key and call the filter function. The filter function just updates the variable and discards the trigger. If (254) does not work, try to change it to some other key (in function and in trigger).
|