04-08-2015, 08:38 AM
I do this to get the full path of the desktop icons.
Thanks Gintaras for the nice little function "FindDesktopListViewControl".
Macro FullPath Desktop Icons
Trigger F10
Thanks Gintaras for the nice little function "FindDesktopListViewControl".
Macro FullPath Desktop Icons
Trigger F10

;Open the popup menu by right-click on the selected icon
if (FindDesktopListViewControl)
,rig
,;Select "Properties" from popup menu
,int w1=wait(5 WV win("" "#32768")) ;;context menu
,Acc a.Find(w1 "MENUITEM" "Properties" "" 0x1000 3)
,a.DoDefaultAction
,
,;Copy and display the full path of the icon on desktop
,int w2=win("" "#32770")
,act w2
,str fullPath.setclip ;; clear clipboard
,key Cc ;; copy icon full path
,fullPath.getclip ;; copy clipboard
,if(fullPath.len)
,,out fullPath
,,'Y ;; just close the popup window
,else
,,'Y ;; just close the popup window
,,a.Find(FindDesktopListViewControl "LIST")
,,ARRAY(Acc) ar
,,a.Selection(ar)
,,int i
,,for i 0 ar.len
,,,_s.from("$desktop$\" ar[i].Name)
,,,out _s.expandpath