-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCoords.py
34 lines (22 loc) · 1000 Bytes
/
Coords.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
import random
class cCoords:
def __init__(self, coordX, coordY):
self.setPoints(coordX, coordY)
#matchTemplate will set pts.
def setPoints(self, coordX, coordY):
self.xyLoc = (coordX, coordY)
# sending touch/tap will reset tuple after pressing loc. from matchTemplate
def reset(self):
self.setPoints(0,0)
# randomize touch to bypass standard (recorded) macro detection system <= recorded macro sends input at the exact same x,y every time aka impossible
def randomizeCoords(self, maxX, maxY):
randX = round(random.uniform(self.xyLoc[0], maxX), 1)
randY = round(random.uniform(self.xyLoc[1], maxY), 1)
return (randX, randY)
def randTime(minTime, maxTime):
waitTime = random.uniform(minTime, maxTime)
return waitTime
def randPoint(xStart, xEnd, yStart, yEnd):
randX = round(random.uniform(xStart, xEnd))
randY = round(random.uniform(yStart, yEnd))
return (randX, randY)