{ "cells": [ { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import win32api,win32con,win32gui\n", "\n", "#win32api.SetCursorPos((200,200))\n", "\n", "#win32gui.GetCursorInfo()[2][0]\n", "\n", "def mouser():\n", " x = win32gui.GetCursorInfo()[2][0]+1\n", " y = win32gui.GetCursorInfo()[2][1]+1\n", " win32api.SetCursorPos((x,y))\n", " x = win32gui.GetCursorInfo()[2][0]-1\n", " y = win32gui.GetCursorInfo()[2][1]-1\n", " win32api.SetCursorPos((x,y))" ] }, { "cell_type": "code", "execution_count": 36, "metadata": { "collapsed": false }, "outputs": [], "source": [ "for i in range(100):\n", " mouser()" ] } ], "metadata": { "kernelspec": { "display_name": "Python [Root]", "language": "python", "name": "Python [Root]" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }