zhmiscellany 5.7.4__py3-none-any.whl → 5.7.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zhmiscellany/_misc_supportfuncs.py +2 -2
- zhmiscellany/discord.py +1 -1
- zhmiscellany/macro.py +13 -5
- {zhmiscellany-5.7.4.dist-info → zhmiscellany-5.7.7.dist-info}/METADATA +1 -1
- {zhmiscellany-5.7.4.dist-info → zhmiscellany-5.7.7.dist-info}/RECORD +7 -7
- {zhmiscellany-5.7.4.dist-info → zhmiscellany-5.7.7.dist-info}/WHEEL +0 -0
- {zhmiscellany-5.7.4.dist-info → zhmiscellany-5.7.7.dist-info}/top_level.txt +0 -0
|
@@ -130,8 +130,8 @@ def move_mouse(x: int, y: int, relative=False):
|
|
|
130
130
|
normalized_y = int(y * (65535 / SCREEN_HEIGHT))
|
|
131
131
|
else:
|
|
132
132
|
if calibrated:
|
|
133
|
-
normalized_x = x * calibration_multiplier_x
|
|
134
|
-
normalized_y = y * calibration_multiplier_y
|
|
133
|
+
normalized_x = math.ceil(x * calibration_multiplier_x)
|
|
134
|
+
normalized_y = math.ceil(y * calibration_multiplier_y)
|
|
135
135
|
else:
|
|
136
136
|
normalized_x = x
|
|
137
137
|
normalized_y = y
|
zhmiscellany/discord.py
CHANGED
|
@@ -290,7 +290,7 @@ def ids_to_message_url(channel_id, message_id, guild_id=None):
|
|
|
290
290
|
if guild_id:
|
|
291
291
|
return f'https://discord.com/channels/{guild_id}/{channel_id}/{message_id}'
|
|
292
292
|
else:
|
|
293
|
-
return f'https://discord.com/channels/{channel_id}/{message_id}'
|
|
293
|
+
return f'https://discord.com/channels/@me/{channel_id}/{message_id}'
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
def message_url_to_ids(message_url):
|
zhmiscellany/macro.py
CHANGED
|
@@ -19,8 +19,6 @@ get_mouse_xy = get_mouse_xy
|
|
|
19
19
|
def click_pixel(x=None, y=None, click_duration=None, right_click=False, middle_click=False, shift=False, ctrl=False, act_start=True, act_end=True, click_end_duration=None, double_click=False, animation_time=None, animation_fps=60, animation_easing=True, relative=False, ensure_movement=True, pre_click_duration=None, pre_click_wiggle=False, click=True):
|
|
20
20
|
if not click:
|
|
21
21
|
act_start=False;act_end=False
|
|
22
|
-
if relative:
|
|
23
|
-
ensure_movement = False
|
|
24
22
|
if right_click and middle_click:
|
|
25
23
|
raise Exception('Both right click and middle click were set to true. Make sure just one is set to true at a time, or neither.')
|
|
26
24
|
if type(x) != tuple and type(x) != list:
|
|
@@ -116,8 +114,8 @@ def click_pixel(x=None, y=None, click_duration=None, right_click=False, middle_c
|
|
|
116
114
|
else:
|
|
117
115
|
cx = x
|
|
118
116
|
cy = y
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
limit = 2 ** 5
|
|
118
|
+
if ensure_movement and (not relative):
|
|
121
119
|
move_mouse(cx, cy, relative=relative)
|
|
122
120
|
for i in range(limit):
|
|
123
121
|
if get_mouse_xy() != (x, y):
|
|
@@ -125,8 +123,18 @@ def click_pixel(x=None, y=None, click_duration=None, right_click=False, middle_c
|
|
|
125
123
|
else:
|
|
126
124
|
break
|
|
127
125
|
else:
|
|
128
|
-
if not
|
|
126
|
+
if not relative:
|
|
129
127
|
move_mouse(cx, cy, relative=relative)
|
|
128
|
+
else:
|
|
129
|
+
if not (animation_time and relative):
|
|
130
|
+
targ = tuple(a + b for a, b in zip(get_mouse_xy(), (cx, cy)))
|
|
131
|
+
move_mouse(cx, cy, relative=relative)
|
|
132
|
+
for i in range(limit):
|
|
133
|
+
cur_pos = get_mouse_xy()
|
|
134
|
+
if cur_pos != targ:
|
|
135
|
+
move_mouse(max(-1, min(1, (targ[0]-cur_pos[0]))), max(-1, min(1, (targ[1]-cur_pos[1]))), relative=relative)
|
|
136
|
+
else:
|
|
137
|
+
break
|
|
130
138
|
|
|
131
139
|
if pre_click_duration:
|
|
132
140
|
if pre_click_wiggle:
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
zhmiscellany/__init__.py,sha256=Oh3gAJRWq2aUEgkolmQyiZOQ3iey5OC4NA2XaTHuVv4,1139
|
|
2
2
|
zhmiscellany/_discord_supportfuncs.py,sha256=RotSpurqFtL5q6v_ST1e2Y_1qJMaHp1CDsF5i-gR4ec,6524
|
|
3
3
|
zhmiscellany/_fileio_supportfuncs.py,sha256=OIboEBVahqbpG1wbtrhAjoFV-oPylFVmOENOByawaX0,365
|
|
4
|
-
zhmiscellany/_misc_supportfuncs.py,sha256=
|
|
4
|
+
zhmiscellany/_misc_supportfuncs.py,sha256=UvD7aFofx-0XlLKS01j81K2afHGtt8usb9-UdNCQCa4,6730
|
|
5
5
|
zhmiscellany/_processing_supportfuncs.py,sha256=aZKWIfJW_lVaQs_EyGGBhmoMc6btA38X2hY6A3kTxN8,10341
|
|
6
6
|
zhmiscellany/_py_resources.py,sha256=HqJs5aRLymLZ2J5Io8g6bY58pGWhN9b8vCktC2DW4KQ,229009
|
|
7
7
|
zhmiscellany/_resource_files_lookup.py,sha256=hsgPW0dngokgqWrAVAv5rUo-eobzJPjvWHt4xrOG5l0,856
|
|
8
8
|
zhmiscellany/cpp.py,sha256=XEUEoIKCDCdY5VgwNWE5oXrGjtsmGdz_MnaVwQmi2dk,179
|
|
9
9
|
zhmiscellany/dict.py,sha256=0BZJ5eK-MurAHYV1OPa0jdGTr-QEWos7ZM0npb-tN9I,81
|
|
10
|
-
zhmiscellany/discord.py,sha256=
|
|
10
|
+
zhmiscellany/discord.py,sha256=bq4fBBIykQrwBKWeJ_Ia5ZtMjP9RfRheOa7fyWZBNjo,19338
|
|
11
11
|
zhmiscellany/fileio.py,sha256=KmRnWWZJWBc5Or3_mKcRY2ehE_Fuk870iS-imtyERyg,18169
|
|
12
12
|
zhmiscellany/gui.py,sha256=VgT5j5UIr-wWyL2P1qCHSNL7RrvZWDlm0TX00JGWmKo,7404
|
|
13
13
|
zhmiscellany/image.py,sha256=qUjxiYpc2VVZp2vwr1vN36O2PVQ7YlMKzhegQ1u4c0M,8198
|
|
14
14
|
zhmiscellany/list.py,sha256=S8Z85bLJEP9lk2JkGpzUcG6kpRB7a-NWDIHMPiF5bKo,1473
|
|
15
|
-
zhmiscellany/macro.py,sha256=
|
|
15
|
+
zhmiscellany/macro.py,sha256=cerHp2YZGGDr-d7r__PV346TNOiW_GY9NecDwx678Pw,16857
|
|
16
16
|
zhmiscellany/math.py,sha256=btOQTe_GvqP0A7Zz84tmN_c8j1NGe_mKnhmAt40lhLU,2482
|
|
17
17
|
zhmiscellany/misc.py,sha256=BsTbRWlXI5LZBG7Bl2MgLzHESyCMJnr_KNZAf2wY_H4,29689
|
|
18
18
|
zhmiscellany/netio.py,sha256=GTamo5cJn4P6u8V_kgZ9kL8qeMUE7OQAmYkmj9Sp_GA,2236
|
|
@@ -21,7 +21,7 @@ zhmiscellany/pipes.py,sha256=PxO4aykFzC60xbTQuc66KzZYIxiW0KPebXZbncD2HcU,3795
|
|
|
21
21
|
zhmiscellany/processing.py,sha256=srwlV8FZ--svF5e6rZZxhIs_6ZjOAwq2OcQEf6T2Le8,10410
|
|
22
22
|
zhmiscellany/rust.py,sha256=znN6DYNoa_p-braTuDZKvUnXX8reWLFu_dG4fv2vLR0,442
|
|
23
23
|
zhmiscellany/string.py,sha256=xyqE6V5YF2nieZDcg5ZrXTIrH2D9oDRbZ5vQGz8rPys,4787
|
|
24
|
-
zhmiscellany-5.7.
|
|
25
|
-
zhmiscellany-5.7.
|
|
26
|
-
zhmiscellany-5.7.
|
|
27
|
-
zhmiscellany-5.7.
|
|
24
|
+
zhmiscellany-5.7.7.dist-info/METADATA,sha256=61XESPrNDcVsG98yoISKgXWqHGqEADRIf240JhRzAMI,42153
|
|
25
|
+
zhmiscellany-5.7.7.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
26
|
+
zhmiscellany-5.7.7.dist-info/top_level.txt,sha256=ioDtsrevCI52rTxZntMPljRIBsZs73tD0hI00HektiE,13
|
|
27
|
+
zhmiscellany-5.7.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|