vbs 模拟鼠标单击,为什么循环一次后,无法单击了
SystemUtil.CloseProcessByName"iexplore.exe"SystemUtil.Run"iexplore.exe","","","",3
Set BrowsDesc=Description.Create()
Set PageDesc=Description.Create()
Set CurPage=Browser(BrowsDesc).Page(PageDesc)
Browser(BrowsDesc).Navigate "http://www.kodyy.com/index.php?r=home/album/index"
CurPage.WebEdit("name:=username").Set "youhua"
CurPage.WebEdit("name:=password").Set "youhua"
CurPage.WebButton("name:=登 录").Click
Set UpButton=Description.Create()
Set UpButton=CurPage.Link("name:=上传")
UpButton.Click
Set AddButton=Description.Create()
Set AddButton=CurPage.WebElement("html id:=uploadSwf")
x=AddButton.GetROProperty("abs_x")+10
y=AddButton.GetROProperty("abs_y")+10
Set AddObj = CreateObject("AutoItX.Control")
AddObj.LeftClickx,y
wait(2)
Set WshShell=CreateObject("WScript.Shell")
WshShell.SendKeys "C:\1.jpg"
WshShell.SendKeys "%O"
wait(2)
Set AddObj=nothing
Set UpLoadButton=Description.Create()
Set UpLoadButton=CurPage.WebButton("html tag:=INPUT")
UpLoadButton.Click
wait(2)
Set MyPicture=Description.Create()
Set MyPicture=CurPage.Link("name:=我的相册","height:=30")
MyPicture.Click
Set logout=Description.Create()
Set logout=CurPage.Link("name:=退出")
logout.Click
Browser(BrowsDesc).Close
[ 本帖最后由 yyc2164708 于 2010-6-22 17:39 编辑 ] 换AutoItX3.Control试试
Set AddObj = CreateObject("AutoItX3.Control")
AddObj.MouseClick x,y
或者换用DeviceReplay
页:
[1]