Posts: 1,031
Threads: 246
Joined: Jul 2022
I have set window triggers for some QM menu items, but they often become ineffective. All menu items become invalid, and I have to restart QM.
Where can I view the logs of failed executions?
Posts: 12,073
Threads: 140
Joined: Dec 2002
No logs.
How to reproduce it?
Posts: 1,031
Threads: 246
Joined: Jul 2022
I cannot reproduce it because I have many QM menu item trigger functions(Trigger QM menu items within a specified window or control). When the issue occurs, all menu items become inactive simultaneously.
The menu item trigger code looks like the following:
I use code (shutdown -2) to restart QM, which requires many QM functions containing C# code to regenerate DLLs.
Is there any other way to restart the functionality of QM menu items?
I've been stuck on this issue for a long time. Thank you very much
Function FFS_QM_Editor
Trigger #R //FFS_QM_Editor
;/
function# iid FILTER&f
;https://www.libreautomate.com/forum/showthread.php?tid=7365&pid=36283#pid36283
if f.hwnd2=GetQmCodeEditor
,;https://scintilla.sourceforge.io/ScintillaDoc.html#SCI_GETSELECTIONEMPTY
,if !SendMessageW(f.hwnd2 SCI.SCI_GETSELECTIONEMPTY 0 0)
,,ret "R1_QM"
,else
,,ret "R0_QM"
ret -2
Function LA_FF
function# iid FILTER&f
if(wintest(f.hwnd "LibreAutomate" "HwndWrapper[Au.Editor;*")) ret iid
ret -2
Menu NP2
Trigger #R //FFC_NP_Editor
te :'Ca * findacc.ico
te :'Cx * findacc.ico
Function FFC_NP_Editor
;/
function# iid FILTER&f
if(!f.hwnd2) ret -2
if(!wintest(f.hwnd "" "Notepad*")) ret -2
if(GetWinId(f.hwnd2)=15) ret iid
if(GetWinId(f.hwnd2)=64259) ret iid
ret -2
Posts: 12,073
Threads: 140
Joined: Dec 2002
Quote:I have set window triggers for some QM menu items
Still I don't understand this statement.
Do you speak about the menubar menus in the QM window? Or about menus like NP2?
Posts: 1,031
Threads: 246
Joined: Jul 2022
02-27-2024, 06:30 AM
(This post was last modified: 02-27-2024, 06:36 AM by Davider.)
Sorry, ike NP2, context menu
When there is an issue, all context menus similar to the one in the picture below become ineffective( The menu is no longer displayed).
https://i.ibb.co/GFJH4yv/1.gif
Posts: 12,073
Threads: 140
Joined: Dec 2002
02-27-2024, 07:38 AM
(This post was last modified: 02-27-2024, 07:42 AM by Gintaras.)
The word "item" confused me.
When menus stop working, are filter-functions like FFC_NP_Editor still called?
If not, does trigger #R work without a filter function? If mouse triggers stop working, they can be restored.
Posts: 1,031
Threads: 246
Joined: Jul 2022
02-27-2024, 08:06 AM
(This post was last modified: 02-27-2024, 08:08 AM by Davider.)
Sorry, my expression was unclear. When I mentioned "item," I was referring to the menu item in the image below. When there is an issue, all menu items become unusable.
https://i.ibb.co/w6Nxwps/acc.png
When the issue occurs, the triggers for the menu items not work, but I don't know why all the menu item triggers have become not work
Posts: 1,031
Threads: 246
Joined: Jul 2022
Posts: 12,073
Threads: 140
Joined: Dec 2002
When menus stop working, are filter-functions like FFC_NP_Editor still called? (insert out to verify it)
If not, does trigger #R work without a filter function? If mouse triggers stop working, they can be restored.
Posts: 1,031
Threads: 246
Joined: Jul 2022
02-27-2024, 09:04 AM
(This post was last modified: 02-27-2024, 09:10 AM by Davider.)
All filter-functions like FFC_NP_Editor is no longer working.
I have too many filter functions( menu items), I don't know which filter function the problem started from.
I can't see the logs, can't find the reason. After restarting QM, everything works fine again.
Is there a way to restart only these filter functions? Because restarting QM will affect the startup speed of many functions that use C# code.
Posts: 12,073
Threads: 140
Joined: Dec 2002
Posts: 1,031
Threads: 246
Joined: Jul 2022
02-29-2024, 07:15 AM
(This post was last modified: 02-29-2024, 07:48 AM by Davider.)
This function is very useful in testing. Thank you.
Is there a way to automatically execute this function when the trigger fails?
|