_SendMessage($hWndDesktop, $LVM_SETITEMPOSITION, $i_index, BitOR(BitShift($i_y, -16), BitAND($i_x, 0xFFFF)))
查看全部评分
举报
$hWndDesktop = ControlGetHandle("Program Manager","",1) $i_index = 0 $i_x = 21 $i_y = 3 _SendMessage($hWndDesktop, $LVM_SETITEMPOSITION, $i_index, BitOR(BitShift($i_y, -16), BitAND($i_x, 0xFFFF)));移动桌面第一个图标 ;WinActivate ($handle,"");激活桌面 ;ControlListView($handle,"",$ctrl,"Select",0,0) ;选中桌面第一个图标 ;MouseMove(41,21,0);移动鼠标到第个图标 MouseClickDrag("",41,45,21,25,0);拖动图标
Local $xy $xy = _GUICtrlListView_GetItemPosition($ctrl, 0);取得桌面第一个图标的座标 $x1 = ($xy[0]+16) $y1 = ($xy[1]+16) $x2 = ($xy[0]+32) $y2 = ($xy[1]+32) WinActivate ($handle,"");激活桌面 MouseClickDrag("",$x1,$y1,$x2,$y2,0);拖动图标 MouseClickDrag("",$x2,$y2,$x1,$y1,0);还原图标原来位置
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2024-11-17 00:24 , Processed in 0.073441 second(s), 21 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.