Code Monkey home page Code Monkey logo

Comments (12)

aicezam avatar aicezam commented on June 11, 2024

https://cloud.tencent.com/developer/article/1702622
https://stackoverflow.com/questions/53131954/modulenotfounderror-no-module-named-windows

是依赖库没装好,这个pymouse有点问题

from smartonmyoji.

aicezam avatar aicezam commented on June 11, 2024

https://cloud.tencent.com/developer/article/1702622
https://stackoverflow.com/questions/53131954/modulenotfounderror-no-module-named-windows

是依赖库没装好,这个pymouse有点问题

from smartonmyoji.

xinbim avatar xinbim commented on June 11, 2024

谢谢 问题解决了

from smartonmyoji.

xinbim avatar xinbim commented on June 11, 2024

又出问题了

目标图片读取中……
读取完成!共[ 12 ]张图片
['end_fail.jpg', 'end_win_0.jpg', 'end_win_1.jpg', 'end_win_2.jpg', 'end_win_3.jpg', 'hun11_start.jpg', 'hun11_start1.jpg', 'hun11_start_zhunbei.jpg', 'hun_rukou1.jpg', 'hun_rukou2.jpg', 'hun_rukou3.jpg', 'queren.jpg']
Traceback (most recent call last):
File "F:\YYS\python\files\SmartOnmyoji-main\smart_onmyoji_start.py", line 79, in
main()
File "C:\Users\xinbi\AppData\Local\Programs\Python\Python37\lib\site-packages\gooey\python_bindings\gooey_decorator.py", line 134, in
return lambda *args, **kwargs: func(*args, **kwargs)
File "F:\YYS\python\files\SmartOnmyoji-main\smart_onmyoji_start.py", line 61, in main
args.loop_min, args.compress_val, args.match_method, args.scr_and_click_method)
File "F:\YYS\python\files\SmartOnmyoji-main\modules\ModuleStart.py", line 86, in start_click
handle_set.set_priority(randint(3, 5)) # 设置目标程序优先级,避免程序闪退
File "F:\YYS\python\files\SmartOnmyoji-main\modules\ModuleHandleSet.py", line 84, in set_priority
handle = OpenProcess(PROCESS_ALL_ACCESS, True, pid)
pywintypes.error: (5, 'OpenProcess', '拒绝访问。')
目标图片读取中……
读取完成!共[ 12 ]张图片
['end_fail.jpg', 'end_win_0.jpg', 'end_win_1.jpg', 'end_win_2.jpg', 'end_win_3.jpg', 'hun11_start.jpg', 'hun11_start1.jpg', 'hun11_start_zhunbei.jpg', 'hun_rukou1.jpg', 'hun_rukou2.jpg', 'hun_rukou3.jpg', 'queren.jpg']
Traceback (most recent call last):
File "F:\YYS\python\files\SmartOnmyoji-main\smart_onmyoji_start.py", line 79, in
main()
File "C:\Users\xinbi\AppData\Local\Programs\Python\Python37\lib\site-packages\gooey\python_bindings\gooey_decorator.py", line 134, in
return lambda *args, **kwargs: func(*args, **kwargs)
File "F:\YYS\python\files\SmartOnmyoji-main\smart_onmyoji_start.py", line 61, in main
args.loop_min, args.compress_val, args.match_method, args.scr_and_click_method)
File "F:\YYS\python\files\SmartOnmyoji-main\modules\ModuleStart.py", line 86, in start_click
handle_set.set_priority(randint(3, 5)) # 设置目标程序优先级,避免程序闪退
File "F:\YYS\python\files\SmartOnmyoji-main\modules\ModuleHandleSet.py", line 84, in set_priority
handle = OpenProcess(PROCESS_ALL_ACCESS, True, pid)
pywintypes.error: (5, 'OpenProcess', '拒绝访问。')
目标图片读取中……
读取完成!共[ 12 ]张图片
['end_fail.jpg', 'end_win_0.jpg', 'end_win_1.jpg', 'end_win_2.jpg', 'end_win_3.jpg', 'hun11_start.jpg', 'hun11_start1.jpg', 'hun11_start_zhunbei.jpg', 'hun_rukou1.jpg', 'hun_rukou2.jpg', 'hun_rukou3.jpg', 'queren.jpg']
Traceback (most recent call last):
File "F:\YYS\python\files\SmartOnmyoji-main\smart_onmyoji_start.py", line 79, in
main()
File "C:\Users\xinbi\AppData\Local\Programs\Python\Python37\lib\site-packages\gooey\python_bindings\gooey_decorator.py", line 134, in
return lambda *args, **kwargs: func(*args, **kwargs)
File "F:\YYS\python\files\SmartOnmyoji-main\smart_onmyoji_start.py", line 61, in main
args.loop_min, args.compress_val, args.match_method, args.scr_and_click_method)
File "F:\YYS\python\files\SmartOnmyoji-main\modules\ModuleStart.py", line 86, in start_click
handle_set.set_priority(randint(3, 5)) # 设置目标程序优先级,避免程序闪退
File "F:\YYS\python\files\SmartOnmyoji-main\modules\ModuleHandleSet.py", line 84, in set_priority
handle = OpenProcess(PROCESS_ALL_ACCESS, True, pid)
pywintypes.error: (5, 'OpenProcess', '拒绝访问。')

from smartonmyoji.

aicezam avatar aicezam commented on June 11, 2024

使用【管理员】身份运行cmd或者power shell呢?

from smartonmyoji.

xinbim avatar xinbim commented on June 11, 2024

也是不行的

from smartonmyoji.

aicezam avatar aicezam commented on June 11, 2024

更新了一下,拉最新的代码试试

from smartonmyoji.

xinbim avatar xinbim commented on June 11, 2024

拉了新代码 可以正常运行了 pygui可以识别但是 不会点击 ,尝试过管理员运行 cmd shell 都不可以点击 这个原因困扰我很久了 之前用一个大佬的程(链接 https://github.com/lisai9093/YYS)也不行,他的程序我是通过把py文件用pyinstaller编译成exe运行后解决的这个问题 ,然后我就尝试了同样的方法 ,编译为exe文件后 (如图
bug

from smartonmyoji.

aicezam avatar aicezam commented on June 11, 2024

在我俩电脑运行的好好的,这个程序编译成exe后会有地址读取不到的bug,还没有找到办法解决😂
另外,可能是因为脚本程序的进程优先级没有游戏窗体的高,所以没法点点击,可以试试手动打开任务管理器,右键点击脚本的进程,设置一下优先级

from smartonmyoji.

aicezam avatar aicezam commented on June 11, 2024

打包用这个
pyinstaller -D smart_onmyoji_start.py -w
然后打包完后,把img文件夹放到生成后的程序目录下面,跟 smart_onmyoji_start.exe 同一个目录就行了

from smartonmyoji.

xinbim avatar xinbim commented on June 11, 2024

设置了优先级 还是不行 我去试试你刚发我的这个 我之前打包用的是这个
PS G:\python> pyinstaller -F F:\YYS\python\files\SmartOnmyoji-main11\smart_onmyoji_start.py

from smartonmyoji.

xinbim avatar xinbim commented on June 11, 2024

好了!!!完美解决!!!谢谢大大 期待百鬼程序

from smartonmyoji.

Related Issues (20)

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.