forked from tanjeffreyz/auto-maple
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
34 lines (24 loc) · 641 Bytes
/
main.py
File metadata and controls
34 lines (24 loc) · 641 Bytes
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
"""The center of Auto Kanna that ties all the modules together."""
import config
import time
from capture import Capture
from listener import Listener
from bot import Bot
cap = Capture()
cap.start()
# Wait for the video capture to initialize
while not config.ready:
time.sleep(0.01)
config.ready = False
listener = Listener()
listener.start()
bot = Bot()
bot.start()
while not config.ready:
time.sleep(0.01)
print('\nSuccessfully initialized Auto Maple, now accepting commands.')
# Periodically save changes to the active Layout if it exists
while True:
if config.layout:
config.layout.save()
time.sleep(5)