It doesn't work exe.
magpie QA Engineer last edited by
We need to get the code down to the exe file. Used a pyinstaller, everything was compromised, but when an exe file was launched, the console would appear on a millisecond and disappear immediately. There's no tex in it, it's empty.
There are lines of concealing console in the code, trying to comment on them and recompiling them, but the problem remains. Can we get an exe file on another one?
Actually, I could and I did it with that code, but I don't remember what I used. There was a white background site with detailed instructions. It also called for a separate setup.py. Does anyone remember what the website is?
I even have the bill of that story, maybe you could find out where it was built?
When an exe file is launched, the console writes
Traceback (most recent call last): File "main.py", line 5, in <module> ModuleNotFoundError: No module named 'telethon'  Failed to execute script 'main' due to unhandled exception!
import random from time import sleep import win32gui import win32.lib.win32con as win32con from telethon import TelegramClient
result = 
with open(filename) as f:
for i in f.readlines():
result = 
result.append([array, array, array])
with open('telegram_input.txt') as f:
lines = f.readlines()
lines = 'False\n'
with open('telegram_input.txt', 'w') as f:
async def main():
await client.send_message(chat, text)
async for message in client.iter_messages(chat):
if 0 < message.button_count < 11:
await message.click(random.randint(0, message.button_count - 1))
if name == 'main':
data = file_to_string_array('telegram_input.txt')
first_run = data
users = split_input(data[1:])
chat = '@aeawed'
text = 'Hello'
for user in users: client = TelegramClient(user, int(user), user) with client: if first_run == 'False': the_program_to_hide = win32gui.GetForegroundWindow() win32gui.ShowWindow(the_program_to_hide, win32con.SW_HIDE) client.loop.run_until_complete(main()) # if first_run == 'False': # win32gui.ShowWindow(the_program_to_hide, win32con.SW_SHOW) if first_run == 'True': first_run_to_false()
irl last edited by
The problem is, I've been copying a project file all the time to get a pyinstaller, but apparently, when the folder is being copied, imports are not copied. Helped.
pip install telethonIn a new folder.
the_program_to_hide = win32gui.GetForegroundWindow() win32gui.ShowWindow(the_program_to_hide, win32con.SW_HIDE)This isn't exactly the right place. The console, first of all, will appear at the very beginning anyway, as these lines are marked with an unclosed salt. Second, these lines are in the cycle. The first time they'll hide the console, and every next time they're active windows that can be closed only through the Dispatch.