Better way no need for ArrangeWindows(0) or GetClipboardFiles
tested on windows 10 and windows7
Function MoveSelectedDesktopFiles2
needs this function as well
Function FindDesktopListViewControl
tested on windows 10 and windows7
Function MoveSelectedDesktopFiles2
spe 100
int hlv=FindDesktopListViewControl
int n=SendMessage(hlv LVM_GETSELECTEDCOUNT 0 0)
str s ss; int item=-1
rep n
,if(GetListViewItemText(hlv item &s 0 2 &item))
,,_s.format("$desktop$\%s[]" s)
,,ss +_s
if n
,ren+ ss "D:\Files\copied"
,OnScreenDisplay "Done !!!"
else
,OnScreenDisplay "No files have been selected !!!"
needs this function as well
Function FindDesktopListViewControl
;/
function#
;Returns the handle of the SysListView32 control that displays desktop icons.
int w=GetShellWindow
int c=child("" "SysListView32" w 0 "id=1")
if !c
,w=win("" "WorkerW" "" 0 F"threadId={GetWindowThreadProcessId(w 0)}"); if(!w) goto gErr
,c=child("" "SysListView32" w 0 "id=1"); if(!c) goto gErr
ret c
;gErr
end "desktop window not found"