@Hifive, select the desired element by holding the right mouse button and select the desired action from the menu that opens
0db1dadf-6f56-484c-985e-bab1297f4ff4-image.png
@to-nice, execute code:
_Idle.moveAndClickOn([[SELECTOR]], {moveMode: "top"})!
[[SELECTOR]] - Selector of the element to click on as a string. To save a selector into a variable you can use this module.
All possible options:
true or false."left", "right" or "double"."center", "top", "bottom", "left", "right", "random" or "nearest". You can specify an array with several possible values, one will be chosen at random.true or false._Idle.moveAndClickOn([[SELECTOR]], {holdCtrl: false, clickType: "left", moveMode: "top", additionalEmulation: false, moveSettings: {speed: 100, gravity: 6, deviation: 2.5}})!
@GhostZ It doesn't work well, my selector [[SELECTOR]] *[contains(@id, "t3_")]/a[@class="absolute inset-0"]
setting move and click with _Idle.moveAndClickOn([[SELECTOR]], {holdCtrl: false, clickType: "left", moveMode: "center", "top", additionalEmulation: false, moveSettings: {speed: 100, gravity: 6, deviation: 2.5}})!
but click in center !! In the images
@to-nice said in Click On element:
moveMode: "center",
You have specified a click in the center, also this function is designed to work accurately with elements of any size, to prevent misclicks, sufficiently large paddings is applied on all sides. Clicks are performed at a random position (Determined by the specified mode) closest to the cursor.
@spam Thanks for the help, I use save selector on CSS: >CSS> a[href*="/r/"].absolute.inset-0 and execute code: _Idle.moveAndClickOn([[SELECTOR]], {holdCtrl: false, clickType: "left", moveMode: "top", additionalEmulation: false, moveSettings: {speed: 100, gravity: 6, deviation: 2.5}})!
@spam You're awesome, it seems to be working perfectly. Can you help me with another problem?
Before clicking "execute code," I should be able to verify that the URL is not external to Reddit, but [[SELECTOR]] only returns the code //a[contains(@id,"post-title")]
in the log. How can I do this?