kenenet 1.2.2__py3-none-any.whl → 1.2.4__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.
kenenet/__init__.py CHANGED
@@ -520,6 +520,8 @@ def time_loop(iterable, cutoff_time=0.1):
520
520
  yield item
521
521
  if time.time() > end_time:
522
522
  break
523
+
524
+ ct = time_loop
523
525
 
524
526
  def get_focused_process_name(mute=False):
525
527
  hwnd = win32gui.GetForegroundWindow()
@@ -534,7 +536,26 @@ def get_focused_process_name(mute=False):
534
536
  except psutil.NoSuchProcess:
535
537
  return None
536
538
 
537
- ct = time_loop
539
+ def coord_rgb(coord=None):
540
+ if coord is not None:
541
+ with mss.mss() as sct:
542
+ region = {"left": coord[0], "top": coord[1], "width": 1, "height": 1}
543
+ screenshot = sct.grab(region)
544
+ rgb = screenshot.pixel(0, 0)
545
+ return rgb
546
+ else: return None
547
+
548
+ cr = coord_rgb
549
+
550
+ def rgb_at_coord(coord=None, rgb=None, range=1):
551
+ if not coord or not rgb:
552
+ return False
553
+ with mss.mss() as sct:
554
+ region = {"left": coord[0], "top": coord[1], "width": 1, "height": 1}
555
+ rgb_ac = sct.grab(region).pixel(0, 0)
556
+ return all(abs(a - b) <= range for a, b in zip(rgb_ac, rgb))
557
+
558
+ rac = rgb_at_coord
538
559
 
539
560
  class k:
540
561
  pass
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kenenet
3
- Version: 1.2.2
3
+ Version: 1.2.4
4
4
  Summary: dude what the fuck even is this package
5
5
  Home-page: https://www.youtube.com/@KiddyKene
6
6
  Author: kiddykene
@@ -0,0 +1,5 @@
1
+ kenenet/__init__.py,sha256=a0Phi1EQqUfDXbIA0OJeP3FK2YXBQ0Jc8VUSsrzotjc,22233
2
+ kenenet-1.2.4.dist-info/METADATA,sha256=a3sJyHW-aJ1fZy4YIilsfkHRJZQTNiMghVPqAgh5Fv0,1693
3
+ kenenet-1.2.4.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
4
+ kenenet-1.2.4.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
+ kenenet-1.2.4.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- kenenet/__init__.py,sha256=2tr73Q3mzdlD2GR0uU8GZgLuXAEy7PmTvGqCJcSmMz8,21557
2
- kenenet-1.2.2.dist-info/METADATA,sha256=UM_pLlbJwXmWQMmuudR9xu5fB-v5XOzLqCI-YhPkBZ8,1693
3
- kenenet-1.2.2.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
4
- kenenet-1.2.2.dist-info/top_level.txt,sha256=gUsWXLrM0jF4b4nbYJZdksdFewIx_F3xOF-zER8fMuQ,8
5
- kenenet-1.2.2.dist-info/RECORD,,