#🔒 Autoclicker that runs when the mouse is held down
152 messages · Page 1 of 1 (latest)
@lethal wharf
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
lmao what you need an autoclicker for? this a cheat?
What's 0, 0 as the last 2 args in the mouse event?
since you have your cursor coords already
not sure… i copy pasted that line let me try removing them and running it
ok
tell me what this is for
if this is for cheating then we don't help
!rule 5
5. Do not provide or request help on projects that may violate terms of service, or that may be deemed inappropriate, malicious, or illegal.
that is true
oh what
no im just making it for fun
you trying to cheat in a game? 💀
did it work?
is there an error message?
nope nothing after the print(x,y)
alright then, carry on
something about the mouse events is bugging
not sure what
ok what does it print for x and y?
the mouse coordinates?
that part seems correct
it printed 518 1212
i just put that to test exactly where it breaks
no
how would i do that
?
sounds like a good idea but how do I run it with admin perms
uhh open the folder that the file is in, right click the python file and run as administrator maybe?
maybe the admin module?
yes?
and then click the path
and type in cmd
which should open a command primot with admin
and run it there
oh ok
nope
unfortunately still doens’t work
it won’t let me type in terminal atall after i click
https://github.com/eHonnef/afk-clicker/blob/master/windows/Main.py I'm looking at this to see how win32api is used
there seems to be a pycwnd.SendMessage() thingy
oh
btw here is my other attempt at making this
it usees pyautogui for the clicks instead
but the same thing happens
it crashes at the click
let me run this script with administrator perms
nope doesn’t work won’t let me close thr window either
super weird
if the interval is less than holdtime then time.sleep((interval - holdtime)/1000) attempts to sleep negative time
sure ill remove it but idk if itll change anything
wait no it won't
cause I put a print right after it
and it runs
the print
very odd error
let me simplify it and remove everything and try a program with just the code to click once
Ok
program lived doesn't print
...
ok there must be something fundamental wrong
cause even this won't work
i tried installing pyautogui with pip again
was already installed
doesn't work
what python version are you on?
how do I check?
in cmd, do py -0
good question let me try
also hbow do I get rid of the command prompts
i can't alt f4 them
no
Is there a reason you don't want to use pyautogui?
?
!pip pyautogui
oh you changed halfway through your post
sorry, I just saw your original screenshot
can'y you just click the 'x'?
what IDe are you using
was using sublime just tried it in vscode
doesn't work
let me try it on another device lmfao
ok
pip isn't working on my other device..
sorry for the delay ill try it on another device
just tried it on another device and now it works
let me try the full code on the other device
im guessing maybe its because the other user didn’t have admin
ok so
the basic clicking works now
but the larger program doesn’t
I realize im not putting the mouse up after putting it down
thats to keep the loop running though
below'
its not registering the clicks everything else is fine
maybe I have to run it as admin
okay to summarize
this is the current code
the loop for when the mouse is held is obstructed by the click being done above since that release makes it think that the mouse button was released
ah ok
its a tricky thing to make because the clicks sent by the thing interfere with its detection of when the mouse button is held down
maybe I could directly get input from the mouse so that its not affected by the virtual clicks send by the program?
There is no difference between "virtual clicks" and actual clicks.
They are all the same
yeah
what I need is
a program that clicks every second while the respective physical mouse button is held down
not sure how to do it though
i know
i was just refering to them as that to differentiate whether the code made them or the user did
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.