![]() I've inserted sleep 300ms between move and click. Move(0, 0, 300, true) - equivalent to Sleep(300) Logitech engineers keep coming up with more creative and hacky ways to force the update and nagging pop ups. Please note Btn#4 is used instead of Btn#8 local mb4_status, exit_flag If not abortableSleep(500) then return end If not delayedClick(1, 200) then return end If not abortableSleep(delay-10) then return end Local function delayedClick(button, delay) While GetRunningTime() <= startTime + delay do Return IsMouseButtonPressed(1) or IsMouseButtonPressed(2) or IsMouseButtonPressed(3) Instead of long blocking sleeps my code checks how much time has passed since start and checks the abort condtion of any button being pressed while waiting. I haven't tested this code but it should at least give you some idea how to approach this. If (event = "MOUSE_BUTTON_PRESSED" and arg = 8) then If event = "MOUSE_BUTTON_PRESSED" and arg = 4 then Until part = 1 or is_interruptable and exit_flag Prev_dx, prev_dy = current_dx, current_dyĮxit_flag = exit_flag or mb4_status and not prev_mb4_status Local x, y = current_dx - prev_dx, current_dy - prev_dy Local part = math.min(time, GetRunningTime() - t0) / time Local function Move(dx, dy, time, is_interruptable) I think there is something about the repeat function that i do not understand correctly.Ĭan anyone show me how to get this to work?Įdit: I have updated the code to what it is now, the original code is below it. I have been trying for a while, with repeats and loops and the only thing i have achieved is a very complex script that makes the software crash after each run, which is slightly annoying. I would like this script to repeat itself continuously until i press a button, it doesn't really matter much which button it uses(except for MB 1, 2 and 3. I have a script which does a left click, then moves to the right about 1 cm, then clicks again and moves back to the left.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |