Санта клауза нету, но Гринч пришел в топик и ответил, спасибо XD Интересно то, что каждый из канвасов еще пару раз рисуется. Возможно тест на производительность какой то... На нойз тест попроще был бы, как раз нашел недавно себе:
function testKnownPixelValue(size, log){ "use strict"; const canvas = document.createElement("canvas"); canvas.height = size; canvas.width = size; const context = canvas.getContext("2d"); const imageData = new ImageData(canvas.width, canvas.height); const pixelValues = imageData.data; for (let i = 0; i < imageData.data.length; i += 1){ if (i % 4 !== 3){ pixelValues[i] = Math.floor(256 * Math.random()); } else { pixelValues[i] = 255; } } context.putImageData(imageData, 0, 0); const p = context.getImageData(0, 0, canvas.width, canvas.height).data; for (let i = 0; i < p.length; i += 1){ if (p[i] !== pixelValues[i]){ log("wrong value", p[i], "at", i, "expected", pixelValues[i]); return true; } } return false; } testKnownPixelValue(10, console.log)Мне нужно добавить более 500 аккаунтов в клиент Thunderbird. Выручите кто знает, кто делал!
-
Привет. Прошу помощи. Мне нужно добавить более 500 аккаунтов в клиент Thunderbird. Все аккаунты с одинаковыми настройками. Просто разные логины и пароли. Вручную очень долго добавлять такое количество аккаунтов. Как можно автоматизировать процесс добавления аккаунтов в почтовый клиент Thunderbird? Может быть через автоконфиг, с помощью JS циклов?!
-
Когда-то давно, когда мне надо было автоматизировать программы на Windows, то использовал pywinauto. Так как не было других путей.
-
Also WinAutomation would work I think. There is the latest version (before they were taken over from Microsoft) available for free on some sites. It's also quite handy for many other tasks.
-
@morpheus93 Cool. I looked at the review. I will study it. Thank you.
-
@niko_belik said in Мне нужно добавить более 500 аккаунтов в клиент Thunderbird. Выручите кто знает, кто делал!:
Да, я тоже подумывал AutoIT применить. Похожий софт.
Да, но там свой язык. Поэтому я использовал его пару раз буквально.
-
@sergerdn said in Мне нужно добавить более 500 аккаунтов в клиент Thunderbird. Выручите кто знает, кто делал!:
Когда-то давно, когда мне надо было автоматизировать программы на Windows, то использовал pywinauto. Так как не было других путей.
С помощью pywinauto можно и самими приложениями BAS управлять.
Задача была проверять скомпилированную программу на ее работоспособность, так и выяснил.
Если кому-то вдруг надо будет, то управляется так:
import asyncio from pywinauto import Application async def main(exe_filename: str): """ Run the app, perform setup, and wait for it to close. :param exe_filename: Path to the compiled app executable. """ # Start the app with specified backend app = Application(backend="uia").start(exe_filename) # Periodically check if the app is running until it has finished downloading dependencies # and has detached from the console. while app.is_process_running(): await asyncio.sleep(5) # Connect to the app window app = Application(backend="uia").connect(title_re="^PyBasFree", timeout=10) # Ensure that the application process is running assert app.is_process_running() is True # Place for additional setup of the app, e.g. setting configurations. # TODO: Implement necessary setup here. # Find the 'OK Enter' button in the app window and click it to start the app. app.window(title="OK Enter", top_level_only=False).wrapper_object().click() if __name__ == "__main__": # Provide the absolute path to the executable and run the main function exe_path = "C:\\Users\\user\\Desktop\\PyBasFree\\PyBasFree.exe" asyncio.run(main(exe_filename=exe_path)) -
M Moderator moved this topic from Off topic on