File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 3
3
# get_cords for gettings game button x and y positions
4
4
5
5
import time
6
- import win32api
7
6
import gameCoordinates
8
7
import mouseEvents
9
8
10
- x_pad = 361
11
- y_pad = 344
12
-
13
9
"""
14
10
Recipes:
15
11
onigiri: 2 rice, 1 nori
@@ -87,12 +83,6 @@ def clearTables():
87
83
mouseEvents .leftClick ()
88
84
time .sleep (2 )
89
85
90
- def getCords ():
91
- x , y = win32api .GetCursorPos ()
92
- x = x - x_pad
93
- y = y - y_pad
94
- print (x , y )
95
-
96
86
def startGame ():
97
87
# first play button
98
88
mouseEvents .mousePos ((883 , 524 ))
Original file line number Diff line number Diff line change 3
3
import time
4
4
import win32api , win32con
5
5
6
+ x_pad = 361
7
+ y_pad = 344
8
+
6
9
def leftClick ():
7
10
win32api .mouse_event (win32con .MOUSEEVENTF_LEFTDOWN , 0 , 0 )
8
11
time .sleep (0.1 )
@@ -20,4 +23,10 @@ def leftUp():
20
23
print ("left release" )
21
24
22
25
def mousePos (cord ):
23
- win32api .SetCursorPos ((x_pad + cord [0 ], y_pad + cord [1 ]))
26
+ win32api .SetCursorPos ((x_pad + cord [0 ], y_pad + cord [1 ]))
27
+
28
+ def getCords ():
29
+ x , y = win32api .GetCursorPos ()
30
+ x = x - x_pad
31
+ y = y - y_pad
32
+ print (x , y )
You can’t perform that action at this time.
0 commit comments