diff --git a/actgui.py b/actgui.py index fc9a3edc7dde6967cddcde2c9808c686afbe7744..2a4402167b61773cf13dee10ec9aeb3ece7a4337 100644 --- a/actgui.py +++ b/actgui.py @@ -5,11 +5,11 @@ import pyautogui ################################################################################# # 손동작 기록 #00000: 기본 상태1 -#11000: 좌 클릭(clickPosX,Y,clickValue) +#11000: 좌 클릭(clickPosX,Y,clickValue), enter(shortcut) #11100: 우 클릭(clickPosX,Y,clickValue) #10001: 드래그(dragPosX,Y), 종료 #11001: 캡쳐(shortcut) -#11111: 확대(toZoom, t, tm), 단축키(shortcut)(01100: 복사, 01111: 붙여넣기 11001: 캡쳐, 10001: 종료) +#11111: 확대(toZoom, t, tm), 단축키(shortcut)(01100: 복사, 01111: 붙여넣기 11001: 캡쳐, 10001: 종료, 11000:enter) #01000: 기본 상태2, 축소(toZoomOut, t, tm) #01100: 커서 이동(pos_2,3,time_k_p), 복사(shortcut) #01110: 실행취소-재실행(pos_4,5) @@ -248,6 +248,11 @@ def shortcut(): # 단축키 캡쳐 print("capture") pyautogui.hotkey('command', 'shift', '4') + + if (case == 11000): + # 단축키 enter + print("enter") + pyautogui.hotkey('enter') @@ -527,12 +532,20 @@ def act_gui(): shortcutf = 1 elif (case == 11000): - bool = left_click() - if (bool): - currentMouseX, currentMouseY = pyautogui.position() - clickPosX = currentMouseX - clickPosY = currentMouseY - clickValue = 1 + if (shortcutf == 1): + # 단축키 붙여넣기 + ########################################## + # 뒤에 shortcutf = 0 + ########################################## + shortcut() + shortcutf = 0 + else: + bool = left_click() + if (bool): + currentMouseX, currentMouseY = pyautogui.position() + clickPosX = currentMouseX + clickPosY = currentMouseY + clickValue = 1 elif (case == 11100 or case == 11110): bool = right_click()