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

每次重启进入会自动收货物 #44

Open
tedxu-nbo opened this issue Oct 14, 2019 · 3 comments
Open

每次重启进入会自动收货物 #44

tedxu-nbo opened this issue Oct 14, 2019 · 3 comments
Labels
question Further information is requested

Comments

@tedxu-nbo
Copy link

每次判断没有要收的货物,自动重启进入,会自动收货物状态,是否有其他朋友也遇到这个问题

@TsingWei
Copy link
Collaborator

啥东西没懂, 可以说详细点吗

@TsingWei TsingWei added the question Further information is requested label Oct 14, 2019
@jimowutong42
Copy link
Contributor

哪里重启后没有等待,导致白色重启界面被误检测为有货状态,执行自动收货操作了。

  • 可能没有更新这部分代码:

# 重新启动app
self.d.app_start("com.tencent.jgm")
# 冗余等待游戏启动完毕
time.sleep(15)

  • 可能是这里self.d.app_start("com.tencent.jgm")之后没有等待游戏启动完毕

# 判断jgm进程是否在前台, 最多等待20秒,否则唤醒到前台
if self.d.app_wait("com.tencent.jgm", front=True,timeout=20):
if not self.appRunning:
# 从后台换到前台,留一点反应时间
print("App is front. JGM agent start in 5 seconds")
time.sleep(5)
self.appRunning = True
else:
self.d.app_start("com.tencent.jgm")
self.appRunning = False
continue

@tedxu-nbo
Copy link
Author

十分感谢

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

No branches or pull requests

3 participants