##test.py
import os,sys
from mouse_key import *
def move_click(x,y,t=0.01):
mouse_move(x,y)
time.sleep(t)
mouse_click(x,y)
def readFile(fname):
with open(fname, 'r') as f:
return f.readlines()
#load url list
urlList = readFile(sys.argv[1])
for url in urlList:
#open chrome
os.system("start chrome %s" % (url))
time.sleep(10)
#move to input tag
move_click(383,288)
time.sleep(1)
#input sexy
key_input("sexy")
sendKey(0x0D)
time.sleep(1)
#input enter key
sendKey(0x0D)
time.sleep(1)
import os
import time
import win32gui
import win32api
import win32con
from ctypes import *
###################################################################################################
# Define the KeyValue
###################################################################################################
VK_CODE = {
'backspace':0x08,' ':0x08,' ':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,
'esc':0x1B,
'spacebar':0x20,
'page_up':0x21,
'page_down':0x22,
'end':0x23,
'home':0x24,
'left_arrow':0x25,
&