from pykeyboard.mac import PyKeyboard
from pymouse import PyMouse
import time
m = PyMouse()
k =PyKeyboard()
print(m.position())
time.sleep(1)
m.click(766,1375)
time.sleep(0.1)
m.click(1138,39)
time.sleep(0.1)
k.type_string("www.google.com")
k.tap_key(k.enter_key)
mac.py
Traceback (most recent call last):
File "/Users/yzw/PycharmProjects/pachong/mouse.py", line 16, in
k.tap_key(k.enter_key)
AttributeError: 'PyKeyboard' object has no attribute 'enter_key'
!/usr/bin/python
-- coding: UTF-8 --
from pykeyboard.mac import PyKeyboard from pymouse import PyMouse import time
m = PyMouse() k =PyKeyboard() print(m.position()) time.sleep(1) m.click(766,1375) time.sleep(0.1) m.click(1138,39) time.sleep(0.1) k.type_string("www.google.com") k.tap_key(k.enter_key)
mac.py Traceback (most recent call last): File "/Users/yzw/PycharmProjects/pachong/mouse.py", line 16, in
k.tap_key(k.enter_key)
AttributeError: 'PyKeyboard' object has no attribute 'enter_key'