Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom program widget handling
#4
If you right-click in Windows Explorer with Shift, it will add menu item "Copy as path". It probably depends on Windows language.
Macro Macro1867
Code:
Copy      Help
;---- Recorded 2014.01.14 11:06:51 ----
int w1=act(win("test" "CabinetWClass"))
'S{             ;; Shift+{
rig 298 508 w1 1 ;;list 'Items View'
'}              ;; }
int wMenu=wait(6 WV win("" "#32768"))
;--------------------------------------
str s.setclip ;;empty clipboard
Acc a.Find(wMenu "MENUITEM" "Copy as path")
a.DoDefaultAction
;;;wait for clipboard text, because in this case DoDefaultAction is asynchronous
rep 500
,0.01
,s.getclip
,if(s.len) break
s.trim("''")
out s
Similar code would be if you use a QM shell menu trigger instead of "Copy as path". The shell menu macro should be function, to avoid problems when 2 macros cannot run simultaneously.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)