Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Context Menu Trigger in QM
#4
How close the trigger menu after clicking an item in the main menu?

Function Explorer_Menu0
Trigger !v"" "#32768" /EXPLORER     Help - how to add the trigger to the macro
Code:
Copy      Help
int hwnd=TriggerWindow

ARRAY(int) a; win("" "#32768" "explorer" 0 0 0 a); if(a.len>1) ret

int h=win
str ext f fs=sub.GetPathsOfSelectedFiles(h)
str docxFs; int hasDocx
foreach f fs
,ext.GetFilenameExt(f)
,if(ext="docx") hasDocx=1; docxFs.addline(f)

if hasDocx
,sub.docx(docxFs)

#sub docx
function str'docxFs
_s=
;1 open docx
_i=ShowMenu(_s 0 0 0 8)
sel _i
,case 1
,foreach _s docxFs
,,run _s

#sub GetPathsOfSelectedFiles
function~ int'hwnd
if(!hwnd) end "folder window not found"

SHDocVw.ShellWindows sw._create
SHDocVw.ShellBrowserWindow b
foreach(b sw)
,int hwnd2=b.HWND; err continue
,if(hwnd=hwnd2) goto g1
ret
;g1
Shell32.ShellFolderView sfw=b.Document ;;get shell folder view document
Shell32.FolderItem fi
str ss
foreach fi sfw.SelectedItems
,ss.addline(fi.Path 1)
ret ss


Messages In This Thread
Context Menu Trigger in QM - by Davider - 08-17-2026, 11:11 PM
RE: Context Menu Trigger in QM - by Gintaras - 08-18-2026, 07:13 AM
RE: Context Menu Trigger in QM - by Davider - 08-18-2026, 09:45 AM
RE: Context Menu Trigger in QM - by Davider - 08-19-2026, 02:32 AM
RE: Context Menu Trigger in QM - by Gintaras - 08-19-2026, 03:43 AM
RE: Context Menu Trigger in QM - by Davider - 08-19-2026, 03:49 AM
RE: Context Menu Trigger in QM - by Davider - 08-19-2026, 05:19 AM
RE: Context Menu Trigger in QM - by Gintaras - 08-19-2026, 06:57 AM
RE: Context Menu Trigger in QM - by Davider - 08-19-2026, 11:43 PM
RE: Context Menu Trigger in QM - by Gintaras - 08-20-2026, 03:57 AM
RE: Context Menu Trigger in QM - by Davider - 08-20-2026, 11:48 AM
RE: Context Menu Trigger in QM - by Davider - 08-21-2026, 12:00 AM
RE: Context Menu Trigger in QM - by Davider - 08-21-2026, 10:25 PM
RE: Context Menu Trigger in QM - by Gintaras - Yesterday, 03:28 AM
RE: Context Menu Trigger in QM - by Davider - Yesterday, 04:20 AM
RE: Context Menu Trigger in QM - by Gintaras - Yesterday, 04:30 AM
RE: Context Menu Trigger in QM - by Davider - Yesterday, 04:50 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)