I tried applying this using ChatGPT, but it didn't work for me. Can you tell me where to put this code to make my code work?
// Функция для эмуляции нажатия мыши внутри элемента <canvas data-sentry-element="Stage"> function simulateMouseClickInCanvas() { const canvas = document.querySelector('canvas[data-sentry-element="Stage"]'); if (!canvas) { console.error("Элемент <canvas> не найден."); return; } const rect = canvas.getBoundingClientRect(); // Выбираем случайные координаты внутри элемента <canvas> const randomX = Math.random() * rect.width + rect.left; const randomY = Math.random() * rect.height + rect.top; // Создаём события мыши const mouseDownEvent = new MouseEvent("mousedown", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); const mouseUpEvent = new MouseEvent("mouseup", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); const clickEvent = new MouseEvent("click", { bubbles: true, cancelable: true, clientX: randomX, clientY: randomY, }); // Эмулируем события canvas.dispatchEvent(mouseDownEvent); canvas.dispatchEvent(mouseUpEvent); canvas.dispatchEvent(clickEvent); } // Функция для выполнения кликов с рандомной задержкой function performRandomClicksInCanvas(maxClicks) { let clicksCount = 0; function clickWithRandomDelay() { if (clicksCount >= maxClicks) { console.log("Все клики выполнены"); return; } const delay = Math.random() * (2000 - 100) + 100; // Рандомная задержка от 0.1 до 2 секунд setTimeout(() => { simulateMouseClickInCanvas(); clicksCount++; console.log(`Клик ${clicksCount} выполнен (задержка: ${Math.round(delay)} мс)`); clickWithRandomDelay(); // Рекурсивный вызов для следующего клика }, delay); } clickWithRandomDelay(); } // Запуск выполнения 10 кликов performRandomClicksInCanvas(10);my DB stopped working
-
cant export to xls
cant export to csvwhen i export, i have only 4 records there
when theres 300 000 records in DB.
cant sort by any tab, this feature worked before.
"select record by criteria" doesnt work with sorting, returns zero results.
without sorting it works. it was working for me for few months i hve been running boots that constantly access db.
i think some of my data ruined the database? usually its just letters and numbers that i scrape from internet. any weird characters shouldnt be inserted into it. but theres 300 000 records so maybe theres a chance.
what to do?
ps my pc very fast, 300 000 records db not lagging or anything
-
when i try to sort in db suddenly all data dissapears and this shows and i cant click edit or delete

(im almost positive that there are no such empty records in it, its some bug..)
-
i managed to export everything to excel seems the data is safe. iused export to csv BUT i saved it as txt
im not sure if my botswork though if i cant access the data with 'select record by criteria". something is up with the sorting feature with big lists
-
i decreased the list from 333k to 100k and it works now along with sorting function. but as my bots run it will increase again in size. what would you guys recommend?