Skip to content

Instantly share code, notes, and snippets.

@noexpect
Last active December 27, 2015 20:39
Show Gist options
  • Save noexpect/7385471 to your computer and use it in GitHub Desktop.
Save noexpect/7385471 to your computer and use it in GitHub Desktop.
guippy使ってIEでgoogleのトップ開いてる状態からググるマウスとキー入力自動操作デモ
# reference
# http://esximatalk.web.fc2.com/guippy/module_reference/window.html
# http://esximatalk.web.fc2.com/guippy/module_reference/mouse.html
# http://esximatalk.web.fc2.com/guippy/tutorial/try_to_use.html
import guippy
import time
gp = guippy.Guippy()
# get mouse position
if 0:
for i in range(10):
#gp.jump(i*10000,i*10000)
print gp.now()
time.sleep(1.0)
print i
# maximize selected window
if 0:
time.sleep(2.0)
# After run this script you have to select IE's window in 2s.
print "start"
gp.catch()
gp.maximize()
# At IE's google.co.jp, auto google search
if 1:
time.sleep(2.0)
# After run this script you have to select IE's window in 2s.
gp.catch()
gp.maximize()
time.sleep(1.0)
gp.jump(23244, 24757)
time.sleep(1.0)
gp.click()
time.sleep(1.0)
gp.punch('Hello world')
time.sleep(1.0)
gp.enter()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment