Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
All menu items often become ineffective
#1
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?
#2
No logs.

How to reproduce it?
#3
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     Help - how to add the trigger to the macro
Code:
Copy      Help
;/
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
Code:
Copy      Help
function# iid FILTER&f

if(wintest(f.hwnd "LibreAutomate" "HwndWrapper[Au.Editor;*")) ret iid
ret -2


Menu NP2
Trigger #R //FFC_NP_Editor     Help - how to add the trigger to the macro
Code:
Copy      Help
te :'Ca * findacc.ico
te :'Cx * findacc.ico
Function FFC_NP_Editor
Code:
Copy      Help
;/

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
#4
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?
#5
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
#6
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.
#7
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
#8
https://i.ibb.co/m5zm1x1/b.png
#9
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.
#10
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. Huh

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.
#11
try

Macro Macro3398
Code:
Copy      Help
RestoreTriggers
#12
This function is very useful in testing. Thank you.

Is there a way to automatically execute this function when the trigger fails?


Forum Jump:


Users browsing this thread: 1 Guest(s)