Skip to content

Commit

Permalink
Add pyautogui as a dependency in pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
RMPR committed Jan 30, 2020
1 parent 103f610 commit 7f2bfc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 1 addition & 9 deletions atbswp/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ def __init__(self):
def on_move(self, x, y):
if not self.recording:
return False
print("mouse moved")

b = time.perf_counter()
if int(b-self.last_time) > 0:
self.capture.append(f"time.sleep ({b - self.last_time})")
Expand All @@ -115,7 +113,6 @@ def on_move(self, x, y):
def on_click(self, x, y, button, pressed):
if not self.recording:
return False
print("mouse clicked")
if pressed:
if button == mouse.Button.left:
self.capture.append(f"pyautogui.mouseDown ({x}, {y}, 'left')")
Expand All @@ -141,12 +138,9 @@ def on_scroll(self, x, y, dx, dy):
print('Scrolled {0} at {1}'.format('down' if dy < 0 else 'up', ({x}, {y})))
self.capture.append(f"pyautogui.scroll({dy})")


def on_press(self, key):
if not self.recording:
return False
print("button pressed")

b = time.perf_counter()
self.capture.append(f"time.sleep ({b - self.last_time})")
self.last_time = b
Expand All @@ -155,7 +149,6 @@ def on_press(self, key):
self.capture.append(f"pyautogui.keyDown({repr(key.char)})")

except AttributeError:
print('special key {0} pressed'.format(key))
if key == keyboard.Key.alt:
if platform.system() == "Darwin":
self.capture.append(f"pyautogui.keyDown('option')")
Expand Down Expand Up @@ -265,7 +258,6 @@ def on_press(self, key):
def on_release(self, key):
if not self.recording:
return False
print("button released")
#self.count_perf()
if key == keyboard.Key.alt:
if platform.system() == "Darwin":
Expand Down Expand Up @@ -418,7 +410,7 @@ class SettingsCtrl:
Control class for the settings
"""
def action(self, event):
print("we reach here hey")
pass


class HelpCtrl:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ authors = ["RMPR <[email protected]>"]
python = "^3.7"
wxPython = "^4.0"
pynput = "^1.6"
pyautogui = "^0.9.48"

[tool.poetry.dev-dependencies]
pytest = "^3.0"
Expand Down

0 comments on commit 7f2bfc1

Please sign in to comment.