MCPcopy Create free account
hub / github.com/a943512/PyAibote / script_main

Method script_main

test_android.py:22–43  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 # 2.3. 注意:script_main 此方法是脚本执行入口必须存在此方法
21 # 2.3. Note: script_main This method must exist in the script execution portal
22 def script_main(self):
23 # 显示手机最近任务列表
24 # Displays the list of recent tasks of the mobile phone
25 result = self.recent_tasks()
26 print(result)
27
28
29 # 主函数死循环时手机app连接断开异常捕获跳出死循环demo示例代码
30 # while True:
31 # try:
32 # # 死循环中必须加入aibote函数代码
33 # self.get_installed_packages()
34 # print("我是个死循环")
35 # time.sleep(2)
36
37 # # 服务端捕获客户端断开异常跳出线程循环结束连接
38 # except OSError as e:
39 # break
40
41 # # 捕获其他非连接断开异常
42 # except Exception as e:
43 # print(e)
44
45
46

Callers

nothing calls this directly

Calls 1

recent_tasksMethod · 0.80

Tested by

no test coverage detected