Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hey man, it's me, necromancer! #3

Open
dasiuk opened this issue Oct 24, 2023 · 11 comments
Open

Hey man, it's me, necromancer! #3

dasiuk opened this issue Oct 24, 2023 · 11 comments

Comments

@dasiuk
Copy link

dasiuk commented Oct 24, 2023

I know this repo has been super dead for the past 4 years, but I really want to find myself a working autoclicker bc I don't know how to code. Libraries can't be installed now, versions stated are ether too old or non-existent, and it does nothing when run. Can I somehow revive in? All I need is to spam 1 keyboard button every 20 seconds in TF2 (specific window)

@eHonnef
Copy link
Owner

eHonnef commented Nov 1, 2023

Hello, could you provide more details about the errors?

  • Environment that you are trying to run (python version, operating system, etc)
  • The error message

Currently I can't promise that I will make changes in the code, but I can see what I can do.

@dasiuk
Copy link
Author

dasiuk commented Nov 2, 2023

Windows 10 Pro, Version 10.0.19044 Build 19044. Python 3.10.9. Error:

C:\Users\aboba\Desktop\windows>python Main.py -n "cs2.exe"
Traceback (most recent call last):
File "C:\Users\aboba\Desktop\windows\Main.py", line 158, in
Main()
File "C:\Users\aboba\Desktop\windows\Main.py", line 150, in Main
afk_Clicker.run(afk_Clicker.get_hwnds_by_name(args.name))
File "C:\Users\aboba\Desktop\windows\Main.py", line 92, in run
raise Exception("Invalid handler, please check PID or process name")
Exception: Invalid handler, please check PID or process name

C:\Users\aboba\Desktop\windows>pip install -r requirements.txt
Collecting pywin32==306 (from -r requirements.txt (line 1))
Using cached pywin32-306-cp310-cp310-win_amd64.whl (9.2 MB)
Collecting win32gui==221.4 (from -r requirements.txt (line 2))
Using cached win32gui-221.4.tar.gz (605 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
Traceback (most recent call last):
File "C:\Users\aboba\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\aboba\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\aboba\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\aboba\AppData\Local\Temp\pip-build-env-7ru0t6wg\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users\aboba\AppData\Local\Temp\pip-build-env-7ru0t6wg\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "C:\Users\aboba\AppData\Local\Temp\pip-build-env-7ru0t6wg\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\aboba\AppData\Local\Temp\pip-build-env-7ru0t6wg\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 26, in
File "C:\Users\aboba\AppData\Local\Temp\pip-install-e1ugdrnt\win32gui_0cd5f4b2f0174a1baa9b02bed3068197\win32\distutils\gui.py", line 6, in
from win32.distutils.command import win32_build_ext
ModuleNotFoundError: No module named 'win32.distutils.command'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

@dasiuk
Copy link
Author

dasiuk commented Nov 2, 2023

My thought is that it probably actually works, but I can't install dependencies listed, since it's so hella old. And can't launch code without them. Also I forgot to mention that I'm looking for an autoclicker to type 1 letter in an inactive window every 20 seconds. So maybe it can't even do it in theory, idk

@eHonnef
Copy link
Owner

eHonnef commented Nov 2, 2023

Hey, so I just checked on a Windows 10 VM using the newest python 3.12.0 and it still works :)

The trick was to bump the version of pywin32 and remove the dependency of win32gui. I updated the requirements.txt in the last commit.

Please, update with the latest commit e5f4094, give a try and let me know if it worked.

@dasiuk
Copy link
Author

dasiuk commented Nov 2, 2023

Ok, yeah. It definitely does something now for sure. But there are still some strange things going on. I repeated your tests, tested in Minecraft and notepad, as well as TF2 (where I hope it'll work) and CS2. So it does not work in any games at all, nothing. But in Notepad it does. Since it has to press letter 'r' every 20 seconds, I tested it with command python Main.py -k 0x52 -p %code%, and instead of typing 'r' it repeatedly typed 虀 (ex 虀虀虀虀虀虀虀虀虀) instead. So maybe windows can't recognize the symbol I'm trying to type? I had english keyboard on at the moment and my Windows is in english too

@dasiuk
Copy link
Author

dasiuk commented Nov 2, 2023

I changed that one number from 1 to 20, so It'll now type every 20 seconds I think. I also tried googling the problem, but found no issues like that, maybe that's on my PC or something. I also tested a few other codes (0x50, 0x51) and they all type the same symbol 虀 instead of letter they supposed to type

Bruh https://www.yellowbridge.com/chinese/dictionary.php?word=%E8%99%80&cache=87827

@eHonnef
Copy link
Owner

eHonnef commented Nov 2, 2023

Bruh https://www.yellowbridge.com/chinese/dictionary.php?word=%E8%99%80&cache=87827

LoL 😆

What you can try to check is in this line https://github.com/eHonnef/afk-clicker/blob/master/windows/Main.py#L83

That line is the one that posts the keystroke to the window handle. Maybe it should post another struct besides the win32con.WM_CHAR.

Maybe I will give a look in the weekend or next week, idk. This code is a little big mess that I ducked tape long ago.

@dasiuk
Copy link
Author

dasiuk commented Nov 3, 2023

Sorry, I just don't know how to code. And your "mess" almost works exactly as needed. Still idk if it'll work for valve's games as some autoclickers don't but to it's huuge still

@dasiuk
Copy link
Author

dasiuk commented Nov 13, 2023

Ay, have you looked into the code?

@dasiuk
Copy link
Author

dasiuk commented Jan 8, 2024

Bruh https://www.yellowbridge.com/chinese/dictionary.php?word=%E8%99%80&cache=87827

LoL 😆

What you can try to check is in this line https://github.com/eHonnef/afk-clicker/blob/master/windows/Main.py#L83

That line is the one that posts the keystroke to the window handle. Maybe it should post another struct besides the win32con.WM_CHAR.

Maybe I will give a look in the weekend or next week, idk. This code is a little big mess that I ducked tape long ago.

Man?...

@eHonnef
Copy link
Owner

eHonnef commented Jan 9, 2024

Hello, sorry, I have no plans to work on this for now. Maybe you'll have some luck in one of the forks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants