Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
double-click triggers for Desktop and Explorer
#1
Hi,

I need the double-click trigger to work in both desktop and explorer
The following code works fine on the desktop, but in Explorer, double-clicking a file or folder without exclusion will still trigger

Also, how to get the folder path of the trigger window in function DT?

Thanks in advance for any advice and help
david

Function DT
Trigger ##L //FF_Desktop     Help - how to add the trigger to the macro
 
Code:
Copy      Help
;Todo: Displays the current folder path
mes "I am in ????? "

Function FF_Desktop
Code:
Copy      Help
;/
function# iid FILTER&f

if(wintest(f.hwnd "" "CabinetWClass")) ;;explore
,ret iid

if f.hwnd2 and GetWindowThreadProcessId(f.hwnd2 0)=GetWindowThreadProcessId(GetShellWindow 0) ;;desktop
,Acc a=acc(f.x f.y)
,if(a.a and a.Role=ROLE_SYSTEM_LIST) ret iid

ret -2
#2
Success, there may be a better way.
 
Code:
Copy      Help
Acc a=acc(mouse)
if a.Role=ROLE_SYSTEM_LIST
,int w=wait(6 WV win("" "CabinetWClass"))
,Acc a.Find(w "TOOLBAR" "" "class=ToolbarWindow32[]id=1001" 0x1004 6)
,str name=a.Name
,name.replacerx(".+?: ")
,mes name
else
,dou xm ym


Forum Jump:


Users browsing this thread: 1 Guest(s)