Move an icon on the desktop
This script moves an icon on the Windows XP desktop.
You can find the corresponding script file under Script_Examples, sub-directory of scripts
'Moves an icon on the Windows XP desktop
'It works for icons with a context menu having the Copy/paste options.
'Desktop must be in foreground, with Active Desktop mode disabled (web desktop off)
'----------------------------------------------------------------------
sub move_icon(icon_name$,x,y)
local temp1, temp2
temp1=#ActionTimeout
temp2=#IgnoreErrors
UseWindow("EXPLORER.EXE|SHELLDLL_DefView|Program Manager|1",1)
ChooseItem(ListView, "1", icon_name$, single, right)
ChooseMenu(Context,"&Copy")
pause 1
UseWindow("EXPLORER.EXE|SysListView32|Program Manager|1",1)
clickmouse(right,down,x,y)
clickmouse(right,up,x,y)
UseWindow("EXPLORER.EXE|SHELLDLL_DefView|Program Manager|1",1)
#ActionTimeout=2
#IgnoreErrors=1
ChooseMenu(Context,"&Paste")
#ActionTimeout=temp1
#IgnoreErrors=temp2
endsub
'---------------------------------------------------------------------
move_icon("My Documents",50,100)