Posts: 1,336
Threads: 61
Joined: Jul 2006
i am noticing a bug in trigger in qm ver 2.2.1.5
i made a simple trigger of word pad assigned a global variable to it and outed it and it out 2-4 times everytime.
any ideas?
Posts: 12,071
Threads: 140
Joined: Dec 2002
What exactly is the trigger?
Some windows set name several times, even if it is the same. Then 'name changed' trigger will be several times. Some windows are activated several times. Then 'active' trigger will be several times.
If it is a macro, let it run >=0.1 s. Then subsequent triggers will be ignored.
If it is a function, in Properties check 'single instance', and also let it run >=0.1 s.
Also try to log window events. It is in menu -> Tools -> Output -> Log -> Window Events. It shows what events QM receives. These events are used by window triggers.
Posts: 1,336
Threads: 61
Joined: Jul 2006
the trigger is
!cv"- WordPad" "WordPadClass"
i never had this issue with qm 2.1.9
i have had to adapt almost all my triggers if macro was made on qm 2.1.9 when using it on
qm 2.2.1.5
got this from window events
created 721414 "WordPadClass" "WordPad"
visible 721414 "WordPadClass" "WordPad"
active 721414 "WordPadClass" "WordPad"
name 721414 "WordPadClass" "Document - WordPad"
single instance isn't really a preferred option
Posts: 12,071
Threads: 140
Joined: Dec 2002
I created a function
Function Function67
Trigger: !cv"WordPad" "WordPadClass"
int hwnd=val(_command)
out _s.getwintext(hwnd)
and it shows only 1 "WordPad" in output when I run wordpad. Maybe there is something specific in your system.
Posts: 576
Threads: 97
Joined: Aug 2007
Try reinstalling QM i had some similar issues in the past and i reinstalled and it solved the problem.
Posts: 1,336
Threads: 61
Joined: Jul 2006
uninstalled and reinstalled still same problem. kinda weird also sometimes it shows 1 and sometimes it shows 2 to 4
Posts: 12,071
Threads: 140
Joined: Dec 2002
How if the function is in an empty macro-list file? To create new file, use menu File -> Open/New File and type a name.
----
If the function is
out val(_command)
, does it show the same number when triggered multiple times?
Posts: 1,336
Threads: 61
Joined: Jul 2006
on a new file the trigger works normal cept when wait is checked then it triggers twice
Posts: 12,071
Threads: 140
Joined: Dec 2002
I checked 'wait' and now it works as you say. Will fix this bug in the next QM version. Thank you.
Posts: 1,336
Threads: 61
Joined: Jul 2006
your welcome anytime glad that was sorted so i guess i won't use wait in triggers .hey also would it also be that if a have simular triggers might be causing it also?
Posts: 12,071
Threads: 140
Joined: Dec 2002
Do you still notice the bug when 'wait' is unchecked?
Posts: 1,336
Threads: 61
Joined: Jul 2006
on a new file i made 5 triggers exactly the same and without wait checked seems to work