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