Created
July 21, 2020 07:08
-
-
Save wonsolution/2137ebb05ac34189bc60409df6a8f8ae to your computer and use it in GitHub Desktop.
Python-mecro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install 한 pyautogui import하기 | |
import pyautogui, sys | |
#마우스 커서 이동할 위치 좌표 : pyautogui.moveTo(x축, y축, 이동시간) | |
pyautogui.moveTo(1206,189,1) | |
#마우스 클릭하기 | |
#pyautogui.click() | |
#특정 좌표 클릭 | |
#pyautogui.click(x=1342, y=586) | |
#오른쪽 마우스 클릭 | |
pyautogui.click(button='right') | |
#더블클릭하기 | |
pyautogui.moveTo(1472,363)#더블클릭할 위치 | |
#pyautogui.click(clicks=2) | |
pyautogui.doubleClick() | |
#내가 클릭하고 싶은 곳의 마우스 좌표 알아내기 | |
print('현재 마우스 위치') | |
try: | |
while True: | |
x, y = pyautogui.position() | |
positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4) | |
print(positionStr, end='') | |
print('\b' * len(positionStr), end='', flush=True) | |
except KeyboardInterrupt: | |
print('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment