-
Notifications
You must be signed in to change notification settings - Fork 1
/
run.py
23 lines (19 loc) · 796 Bytes
/
run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import keyboard
import ctypes
from config.intro_message import intro_message
from config.handle_bot import bot_process, start_bot, stop_bot, terminate_and_exit
# Set the console window title to "Anya Shop Bot 0.1"
ctypes.windll.kernel32.SetConsoleTitleW("Anya Shop Bot 0.1")
# Display the introductory message in the console
print(intro_message)
# Main loop to check for specific key presses to control the bot
while True:
# Start the bot when F1 is pressed and no bot process is running
if keyboard.is_pressed('F1') and bot_process is None:
start_bot()
# Stop the bot when F2 is pressed
elif keyboard.is_pressed('F2'):
stop_bot()
# Terminate the bot and exit the program when F4 is pressed
elif keyboard.is_pressed('F4'):
terminate_and_exit()