-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.py
41 lines (32 loc) · 986 Bytes
/
action.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import time
# App import
from package.appActions.info import getAppName
from package.appActions.switch import switchApp
from package.click.basic import randomClick
from package.typing.basic import press
# screen size is 1728x1117
def customActions():
while(True):
# START: Press right only for 2 apps 95629, 810
while(True):
if(getAppName() == 'Code' or getAppName() == 'PhpStorm'):
press()
else:
break
# END.
# START: Random click
while(True):
if(getAppName() == 'Code' or getAppName() == 'PhpStorm'):
break
else:
randomClick()
# END: Random click
time.sleep(1)
def init():
# --- This line for check current position --
# print(pyautogui.position())
# time.sleep(2)
# randomClick()
customActions()
init()
# Document: https://pyautogui.readthedocs.io/en/latest/keyboard.html