GithubHelp home page GithubHelp logo

Comments (11)

eHonnef avatar eHonnef commented on August 23, 2024

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.

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 2024

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.

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 2024

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

from afk-clicker.

eHonnef avatar eHonnef commented on August 23, 2024

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.

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 2024

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

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 2024

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

from afk-clicker.

eHonnef avatar eHonnef commented on August 23, 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.

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 2024

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

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 2024

Ay, have you looked into the code?

from afk-clicker.

dasiuk avatar dasiuk commented on August 23, 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?...

from afk-clicker.

eHonnef avatar eHonnef commented on August 23, 2024

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

from afk-clicker.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.