-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtessst_ahp.py
75 lines (43 loc) · 1.23 KB
/
tessst_ahp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from dataclasses import dataclass
from time import perf_counter
from autohotpy import ahk
# ahk.include(r"testit.ahk")
def get_count(obj):
# return ahk._ahk_instance.communicator.py_references.get_refcount(obj)
...
def crap(h):
arr = ahk.Array[int](1, 2, 3)
print("starting...")
start = perf_counter()
for i in range(1000):
for val in arr:
...
end = perf_counter()
print("done", end - start)
@dataclass
class Wut:
foo: dict
def import_typing():
from autohotpy import ahk
ahk["hi"]
ahk.Array
from autohotpy.ahk import VarRef
def main():
# ahk["^q" :: ahk.ExitApp]
# ahk["^h" :: ahk.caller]
# ahk["!s"::crap]
# thing: ahk.Object = ahk.my_obj
# ref: ahk.VarRef = ahk.VarRef(thing)
# print(ref.value)
# ahk.test_iter({"hi": "cool", "foo": "bar"})
# print(ahk.OwnProps(ahk.caller("")))
# print(ahk.my_hoopla.goop[1, 2])
# ahk.my_py_thing = Wut({"world": "cool"})
# ahk.my_obj.foo["baz"] = "who?"
# print(ahk.my_obj.foo["bar"])
# print(ahk._Python.on_error(Exception("hi")))
# print(f"caller returned {ahk.caller('weee')}")
ahk.MsgBox("hi")
ahk.run_forever()
if __name__ == "__main__":
main()