zhmiscellany 6.0.2__py3-none-any.whl → 6.0.3__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.
@@ -173,9 +173,16 @@ def calibrate():
173
173
  # calibrate relative movement, required because windows is weird
174
174
  original_mouse_point = get_mouse_xy()
175
175
  calibration_distance = 128
176
- move_mouse(0,0)
177
- move_mouse(calibration_distance, calibration_distance, relative=True)
178
- moved_pos = get_mouse_xy()
176
+ moved_pos = (0, 0)
177
+ lim = 64
178
+ i = 0
179
+ while ((not moved_pos[0]) or (not moved_pos[1])) and i < lim:
180
+ i += 1
181
+ move_mouse(0,0)
182
+ move_mouse(calibration_distance, calibration_distance, relative=True)
183
+ moved_pos = get_mouse_xy()
184
+ if not i < lim:
185
+ raise Exception('Relative mouse movement could not be calibrated, maybe you were tabbed into an application that was controlling your mouse?')
179
186
  calibration_multiplier_x = calibration_distance/moved_pos[0]
180
187
  calibration_multiplier_y = calibration_distance/moved_pos[1]
181
188
  calibrated = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zhmiscellany
3
- Version: 6.0.2
3
+ Version: 6.0.3
4
4
  Summary: A collection of useful/interesting python libraries made by zh.
5
5
  Home-page: https://discord.gg/ThBBAuueVJ
6
6
  Author: zh
@@ -1,7 +1,7 @@
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=y5hlFjenJTrEPjR9VH0F7X9JhUWSV-Gx-fahNzyMMU8,7003
4
+ zhmiscellany/_misc_supportfuncs.py,sha256=9CXl0PuD7qTBsvLeXBS0YmOzWfjyApv7ajCzxZcRLvw,7320
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
@@ -21,7 +21,7 @@ zhmiscellany/pipes.py,sha256=PxO4aykFzC60xbTQuc66KzZYIxiW0KPebXZbncD2HcU,3795
21
21
  zhmiscellany/processing.py,sha256=sDKIbzG9TNFyT6yJ4TJL59taG-59_v3CBLekVSLrwgE,10899
22
22
  zhmiscellany/rust.py,sha256=znN6DYNoa_p-braTuDZKvUnXX8reWLFu_dG4fv2vLR0,442
23
23
  zhmiscellany/string.py,sha256=xyqE6V5YF2nieZDcg5ZrXTIrH2D9oDRbZ5vQGz8rPys,4787
24
- zhmiscellany-6.0.2.dist-info/METADATA,sha256=rXWqImmifEf8RrJ3-ZUs76hn9XAVNvJkGRthRxYTN-s,43460
25
- zhmiscellany-6.0.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
26
- zhmiscellany-6.0.2.dist-info/top_level.txt,sha256=ioDtsrevCI52rTxZntMPljRIBsZs73tD0hI00HektiE,13
27
- zhmiscellany-6.0.2.dist-info/RECORD,,
24
+ zhmiscellany-6.0.3.dist-info/METADATA,sha256=bDi3EVy4ncXtrd6K6b8GkRUc6bs2hGEM2YdGM0Tjqqo,43460
25
+ zhmiscellany-6.0.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
26
+ zhmiscellany-6.0.3.dist-info/top_level.txt,sha256=ioDtsrevCI52rTxZntMPljRIBsZs73tD0hI00HektiE,13
27
+ zhmiscellany-6.0.3.dist-info/RECORD,,