refactor dig
This commit is contained in:
@@ -18,6 +18,9 @@ def run():
|
||||
|
||||
# PLOT_TO_USE = "business"
|
||||
PLOT_TO_USE = "main_plot"
|
||||
GRID_SIZE_WIDTH = 30
|
||||
GRID_SIZE_DEPTH = 24
|
||||
DIG_TIME = 150
|
||||
|
||||
# initialize the StunWindowCapture class
|
||||
try:
|
||||
@@ -125,12 +128,12 @@ def run():
|
||||
# start 167, end 167 - (47 * 3), step -47
|
||||
start_left = point[0] - (size * left)
|
||||
start_up = point[1] - (size * down)
|
||||
for f in range(start_up, start_up + (size * 24), size):
|
||||
for i in range(start_left, start_left + (size * 30), size):
|
||||
for f in range(start_up, start_up + (size * GRID_SIZE_DEPTH), size):
|
||||
for i in range(start_left, start_left + (size * GRID_SIZE_WIDTH), size):
|
||||
pydirectinput.moveTo(i + offset_left, f + offset_down)
|
||||
pydirectinput.mouseDown()
|
||||
w = random.randint(1, 50)
|
||||
cv.waitKey(150 + w)
|
||||
cv.waitKey(DIG_TIME + w)
|
||||
pydirectinput.mouseUp()
|
||||
if keyboard.is_pressed('p') == True or pause == True:
|
||||
pause = True
|
||||
@@ -147,8 +150,8 @@ def run():
|
||||
for pointi in pointis:
|
||||
pydirectinput.moveTo(pointi[0] + offset_left, pointi[1] + offset_down)
|
||||
pydirectinput.mouseDown()
|
||||
w = random.randint(1, 100)
|
||||
cv.waitKey(150 + w)
|
||||
w = random.randint(1, 50)
|
||||
cv.waitKey(DIG_TIME + w)
|
||||
pydirectinput.mouseUp()
|
||||
|
||||
if keyboard.is_pressed('p') == True or pause == True:
|
||||
|
||||
Reference in New Issue
Block a user