Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Triggers not reliable
#1
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
#2
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.
#3
Thanks Gintaras. I have something in mind that might be the problem.
Matt B
#4
let us know what/if you find anything matt.
An old blog on QM coding and automation.

The Macro Hook
#5
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
#6
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.
#7
Run this function. It shows message box when triggers stop working.
Name: not important.
Trigger: (254) //FF_ttest
Code:
Copy      Help
/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
Code:
Copy      Help
;/
function# iid FILTER&f

int+ g_ttest=GetTickCount
#8
Create this function.
Name: FF_ttest
Properties: 'filter function' checked
Code:
Copy      Help
;/
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
Code:
Copy      Help
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
#9
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.
An old blog on QM coding and automation.

The Macro Hook
#10
no I think it is not related.
#11
thanks.
An old blog on QM coding and automation.

The Macro Hook
#12
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
#13
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'
pi
#14
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).


Forum Jump:


Users browsing this thread: 1 Guest(s)