python - 为什么这个脚本运行,然后说没有响应?
问题描述
我正在使用 PyQt5 并将此功能连接到一个复选框。当我选中该框时,它会运行,但程序显示“没有响应”,然后我所能做的就是重新启动整个程序。
def glowEsp(self, state):
if state == QtCore.Qt.Checked:
print('Glow ESP enabled...')
pm = pymem.Pymem('csgo.exe')
client = pymem.process.module_from_name(pm.process_handle, 'client.dll').lpBaseOfDll
while True:
glow_manager = pm.read_int(client + dwGlowObjectManager)
for i in range(1,32):
entity = pm.read_int(client + dwEntityList + i * 0x10)
if entity:
entity_team_id = pm.read_int(entity + m_iTeamNum)
entity_glow = pm.read_int(entity + m_iGlowIndex)
if entity_team_id == 2:
pm.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(1)) # R
pm.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(0)) # G
pm.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(0)) # B
pm.write_float(glow_manager + entity_glow * 0x38 + 0x14, float(1)) # Alpha
pm.write_int(glow_manager + entity_glow * 0x38 + 0x28, 1)
elif entity_team_id == 3:
pm.write_float(glow_manager + entity_glow * 0x38 + 0x8, float(0)) # R
pm.write_float(glow_manager + entity_glow * 0x38 + 0xC, float(1)) # G
pm.write_float(glow_manager + entity_glow * 0x38 + 0x10, float(0)) # B
pm.write_float(glow_manager + entity_glow * 0x38 + 0x14, float(1)) # Alpha
pm.write_int(glow_manager + entity_glow * 0x38 + 0x28, 1)```
解决方案
推荐阅读
- javascript - 未捕获的类型错误:无法读取未定义的属性“id”-将数组回显到脚本中时
- excel - 在 vba excel 上仅选择 10 个字符(右)
- sql - Oracle 连接到多个列中的任何一个
- python-3.x - ASGI:哨兵错误似乎显示来自不同请求的混合回溯
- java - 获取 XML 文档中元素的数量
- kubernetes - 将复杂的 YAML 转换为 .tf
- elasticsearch - fluentd :使用弹性搜索 FluentD 和 Kibana 从多个资源聚合日志
- android - Android iOS 深度链接,一个域,多个应用
- jpa - JPA CriteriaBuilder - 替代通配符
- android - Unity - 使用 Android 设备后退按钮返回上一个场景