Skip to content

Commit 2d60c64

Browse files
authored
Merge pull request #236 from BrentZ-1849203/master
Added script for checking mouse position on screen
2 parents 73f79c3 + 83f44dc commit 2d60c64

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Automation/src/checkmousepos.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! python3
2+
# Author : Brent Zoomers, 4/10/'20
3+
4+
# Program prints out current mouse position in console.
5+
6+
import pyautogui, sys
7+
8+
print('Press Ctrl-C to quit.')
9+
try:
10+
while True:
11+
x, y = pyautogui.position()
12+
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4)
13+
print(positionStr, end='')
14+
print('\b' * len(positionStr), end='', flush=True)
15+
except KeyboardInterrupt:
16+
print('\n')

0 commit comments

Comments
 (0)