我有一个机器人在http://pastebin.com/X34Qxrxx
运行超级六边形(只是为了好玩)不幸的是,每当我用IDLE 3.5 32位运行它时,我都会收到错误
Traceback (most recent call last):
File "C:\Users\Spencer\Desktop\Super-Hexagon-Bot\super_hexagon_bot.py", line 223, in <module>
main()
File "C:\Users\Spencer\Desktop\Super-Hexagon-Bot\super_hexagon_bot.py", line 213, in main
window_handle = win32ui.FindWindow(None, u"Super Hexagon").GetSafeHwnd()
NameError: name 'win32ui' is not defined
有人可以帮忙吗?我不确定如何解决这个问题
答案 0 :(得分:0)
而不是:
window_handle = win32ui.FindWindow(None, u"Super Hexagon").GetSafeHwnd()
尝试:
window_handle = win32ui.win32ui.FindWindow(None, u"Super Hexagon").GetSafeHwnd()
或
window_handle = FindWindow(None, u"Super Hexagon").GetSafeHwnd()
这有效吗?