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);filters in "select records by criteria" work wanky
-
i added records to db with "insert record"
2 fields were empty, nothing was written there
now i try "select record by criteria":
-field empty (not getting any results)
-field equals == "" (string, not getting any results)
-field equals == "" (expression, again not getting any results)they are empty but i cant get them, how do i get them? i guess i must make them -1 instead of empty
-
@yourfriendkarol said in filters in "select records by criteria" work wanky:
i added records to db with "insert record"
2 fields were empty, nothing was written there
now i try "select record by criteria":
-field empty (not getting any results)
-field equals == "" (string, not getting any results)
-field equals == "" (expression, again not getting any results)they are empty but i cant get them, how do i get them? i guess i must make them -1 instead of empty
The action works correctly:



test script