文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>用python控制鼠标

用python控制鼠标

时间:2007-04-18  来源:bleem1998

想写个机器人自动点鼠标干活 算是简略版的Dogtail吧 下面的程序演示如何取得/控制鼠标位置 只是个小小的开始      

from ctypes import *
import time

class POINT(Structure):
     _fields_ = [("x", c_ulong),
     ("y", c_ulong)]
orig = POINT()
windll.user32.GetCursorPos(byref(orig))
print 'Orig Pos:', orig.x, orig.y
print 'Move to center of the screen'
windll.user32.SetCursorPos(1023/2, 767/2)
time.sleep(1)
windll.user32.SetCursorPos(orig.x, orig.y)

相关阅读 更多 +
排行榜 更多 +
别惹神枪手安卓版

别惹神枪手安卓版

冒险解谜 下载
坦克战争世界

坦克战争世界

模拟经营 下载
丛林反击战

丛林反击战

飞行射击 下载