本帖最后由 zcx880517 于 2010-8-18 21:20 编辑
用鼠标操作即可,多看看帮助文档,有鼠标操作的相关函数。#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
GUICreate("桌面图标排序--by:zcx880517", 400, 320, -1, -1)
$btn1 = GUICtrlCreateButton("按名称排序",50,50,150,50)
$btn2 = GUICtrlCreateButton("按大小排序",50,110,150,50)
$btn3 = GUICtrlCreateButton("按类型排序",50,170,150,50)
$btn4 = GUICtrlCreateButton("按修改时间排序",50,230,150,50)
$lab1 = GUICtrlCreateLabel("http://www.autoitx.com",255,295,200,30)
GUICtrlSetCursor(-1, 0)
GUISetState(@SW_SHOW)
Local $msg,$btn1,$btn2,$btn3,$btn4,$lab1
While 1
$msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
Case $btn1
ShellExecute("显示桌面.scf" , "", @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch")
Sleep(600)
MouseClick("right")
Sleep(500)
Send("{I}")
Sleep(500)
Send("{N}")
Case $btn2
ShellExecute("显示桌面.scf" , "", @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch")
Sleep(600)
MouseClick("right")
Sleep(500)
Send("{I}")
Sleep(500)
Send("{S}")
Case $btn3
ShellExecute("显示桌面.scf" , "", @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch")
Sleep(600)
MouseClick("right")
Sleep(500)
Send("{I}")
Sleep(500)
Send("{T}")
Case $btn4
ShellExecute("显示桌面.scf" , "", @AppDataDir & "\Microsoft\Internet Explorer\Quick Launch")
Sleep(600)
MouseClick("right")
Sleep(500)
Send("{I}")
Sleep(500)
Send("{M}")
Case $lab1
ShellExecute("http://www.autoitx.com")
EndSwitch
WEnd
|