print('Я работаю')
import webbrowser
import time
from telethon import TelegramClient, events, sync
from ahk import AHK, Hotkey
ahk = AHK()
last_message_id = 0
api_id = 123456
api_hash = '123456'
client = TelegramClient('clon', api_id, api_hash)
@client.on(events.NewMessage())
async def new_message_event_handler(event):
global last_message_id
if event.message.id > last_message_id:
last_message_id = event.message.id
webbrowser.open('https://google.com'))
time.sleep(3)
ahk.click(1330, 450)
time.sleep(1)
ahk.click(1111, 630)
time.sleep(1)
ahk.send_input('^a')
time.sleep(1)
ahk.send_input('^c')
ahk.click(1360, 500)
time.sleep(1)
ahk.send_input('^v')
time.sleep(1)
ahk.key_press('Enter')
client.start()
client.run_until_disconnected()