runhey 3 лет назад
Родитель
Сommit
4f63ba4b47

+ 1 - 1
.gitignore

@@ -26,7 +26,7 @@ test/
 build-fluentui-Desktop_*/
 module/config/argument/setting.json
 !fluentui/*
-
+!dev_tools/*
 
 
 

+ 5 - 0
dev_tools/README.md

@@ -0,0 +1,5 @@
+### 这三个都是窗口的管理工具
+
+- Spyxx (微软自家的)
+- ViewWizard2(简易版本)
+- ViewWizard3

BIN
dev_tools/Spyxx/spyxxhk.dll


BIN
dev_tools/Spyxx/spyxxhk_amd64.dll


+ 11 - 0
dev_tools/ViewWizard2/Settings.ini

@@ -0,0 +1,11 @@
+[Settings]
+NormalSize=1
+AlwaysOnTop=1
+EnableWin=0
+ShowHideWin=0
+OpenSound=1
+NotFindHideWin=1
+AutoFindWin=0
+OpenHideMode=0
+OnTopDraw=1
+DrawType=1

+ 100 - 0
dev_tools/ViewWizard3/Help.txt

@@ -0,0 +1,100 @@
+				ViewWizard 3.5
+
+句柄精灵是一个窗口辅助工具,用于获得窗口各种信息和属性。其中包括窗口类,大小,样式,状态,字体等相关内容。此外,它可以控制一个窗口的状态,比如显示或隐藏,置顶,透明,更改样式等等。
+
+具体介绍:
+
+窗口样式编辑器:用于修改窗口样式和扩展样式。
+窗口创建监视器:监视顶层窗口的创建和销毁。
+系统窗口列表:查看系统所有窗口,其中包括不可见的Message窗口以及内核挂钩的隐藏窗口。
+自动显示隐藏控件:选择该项后,当前活动窗口中的隐藏的控件(子窗口)会全部显示出来。
+自动激活无效控件:选择该项后,当前活动窗口中的无效的控件(呈灰色)会变为有效。
+取色器:功能强大的屏幕取色器。
+屏幕抓图工具:可抓取桌面、窗口和区域图像。
+
+软件设置:
+
+搜索隐藏窗口:搜索隐藏的控件,不包括顶层窗口。
+搜索透明窗口:搜索穿透的窗口,这种窗口不接受鼠标点击。
+搜索挂起窗口:搜索被挂起线程的窗口,容易死锁,除非特殊情况,否则不要选择。
+暴力搜索窗口:强制遍历系统所有窗口
+透视搜索窗口:搜索前先把自己设为穿透,以便能够看到下面的窗口。
+Shift键搜索:按下Shift键自动捕获窗口。
+搜索模式:精确搜索将搜索最内层的可见的子窗口,标准Z序搜索将搜索最上层的窗口。
+
+其它选项:
+
+鼠标链接:关系一栏所列出的相关窗口以及文件路径栏,单击以便快速捕获窗口或定位文件。
+附加栏:列出基本控件的专项信息。
+窗口文本查看功能:该项会列出窗口的标题或控件的文字内容,对于特殊类型的窗口,比如ListView,则会列出它的列表项数据。
+窗口菜单查看功能:列出窗口包含的菜单内容。
+*内容:代表该项不可用或者获取失败。
+终极模式:拖动搜索屏幕上能看到的所有窗口
+
+3.5
+增加定位
+增加搜索挂起窗口
+增加暴力搜索窗口及暴力模式
+密码框判断不对
+加强总在最前问题
+通过数值编辑窗口样式
+
+3.4.8
+总在最前后不再被Win+D最小化
+
+3.4.6
+加强总在最前时右键菜单无法弹出
+
+3.4.5
+增加设置还原密码框字符
+增加加强总在最前
+密码掩码有时获取不对
+
+3.4:
+窗口列表图标换掉
+增加进程部分信息
+增加设置窗口视界
+修正系统窗口列表功能
+增加窗口最大化坐标/最小最大尺寸
+增加窗口透明度显示
+修正设置窗口透明/穿透功能
+光标和画刷描述
+
+3.3:
+增加ListView修改器,可编辑任意ListView控件内容
+增加部分热键
+样式窗口选定项高亮显示
+
+3.2:
+增加查看进程窗口功能
+win8以上无法获取消息窗口问题
+菜单布局等
+其它问题
+
+3.1.1:
+控件显示状态不正确问题,不再随父窗口的状态而改变
+
+3.1更新:
+1.增加窗口坐标功能
+2.修复窗口坐标显示不准确问题
+3.修复编辑窗口坐标窗口
+4.增加智能调整窗口大小
+5.增加直接复制句柄
+6.非标准类不能保存问题
+
+
+	yuanfang235
+
+E-mail:369823808@qq.com
+
+博客:http://zzmzzff.blog.163.com
+
+官网:http://www.yuanfang235.icoc.cc/
+
+
+	2014年3月
+
+
+
+
+

+ 35 - 0
dev_tools/ViewWizard3/Set.ini

@@ -0,0 +1,35 @@
+[Set]
+AlwaysOnTop=1
+ForceOnTop=0
+SearchHidden=0
+SearchThrough=0
+SearchSuspended=0
+ForceSearch=0
+ThroughSearch=0
+ShowIcons=1
+Sound=1
+WarnDestroy=1
+WinBKGround=0
+KeyMode=0
+SearchAll=0
+SearchType=0
+PaintType=0
+OnTopPaint=1
+AutoUpdate=0
+AttrMask=8191
+ClickGet=0
+[Font]
+FontName=ËÎÌå
+FontSize=9
+FontBold=400
+FontItalic=0
+FontCharset=0
+[Window]
+Maximized=0
+Width=14595
+Height=8685
+Left=2580
+Top=1890
+[Column]
+Col0=2000
+Col1=10110

BIN
dev_tools/ViewWizard3/VB6CHS.DLL


BIN
dev_tools/ViewWizard3/mscomctl.ocx


BIN
dev_tools/ViewWizard3/msvbvm60.dll


BIN
module/config/i18n/zh_CN.qm


+ 9 - 5
module/config/i18n/zh_CN.ts

@@ -263,23 +263,27 @@
 	<message>
         <source>handle_help</source>
         <translation>填 "auto" 自动检测模拟器,多个模拟器正在运行或使用不支持自动检测的模拟器时无法使用 "auto",必须手动填写
-输入为句柄标题或者是句柄号,每次启动模拟器时句柄号会变化
+输入为句柄标题或者是句柄号,每次启动模拟器时句柄号会变化。清空表示不使用window的操作方式。
 
 句柄标题 Handle:
 [MuMu模拟器12]: "MuMu模拟器12"
-[MuMu模拟器]: "MuMu模拟器" "\n"
+[MuMu模拟器]: "MuMu模拟器" 
 [雷电模拟器](全系列通用): "雷电模拟器"
 
 句柄号 Handle:
-!!!占位符</translation>
+某些模拟器多开时具有相同的句柄标题(说的就是MuMu),此时需要手动获取模拟器的句柄号手动设置。
+获取工具请查阅文档:[模拟器支持] </translation>
     </message>
 	<message>
         <source>screenshot_method_help</source>
-        <translation>目前只支持window_background, 其他还未完整的测试</translation>
+        <translation>使用自动选择时,将执行一次性能测试并自动更改为最快的截图方案。一般情况下的速度: 
+window_background >>> DroidCast_raw >  ADB_nc >> DroidCast > uiautomator2 ~= ADB
+使用window_background来截图是10ms左右,对比DroidCast_raw是100ms左右(仅限作者的电脑)。但是window_background有一个致命的缺点是模拟器不可以最小化,望周知</translation>
     </message>
 	<message>
         <source>control_method_help</source>
-        <translation>目前只支持window_message, 其他还未完整的测试</translation>
+        <translation>速度: window_message ~= minitouch > Hermit >>> uiautomator2 ~= ADB
+控制方式是模拟人类的速度,也不是越快越好 使用(window_message)会偶尔出现失效的情况</translation>
     </message>
 	<message>
         <source>Adb Restart</source>

+ 12 - 11
module/device/handle.py

@@ -179,17 +179,18 @@ class Handle:
             window_list = Handle.all_windows()
             self.root_handle_title = self.auto_handle_title(window_list)
             self.root_handle_num = handle_title2num(self.root_handle_title)
-        elif isinstance(self.root_handle, int):
-            logger.info('Handle is handle num. oas use it as root handle num')
-            if is_handle_valid(self.root_handle):
-                logger.info(f'handle number {self.root_handle} is valid')
-                self.root_handle_title = handle_num2title(self.root_handle)
-                self.root_handle_num = self.root_handle
-        elif isinstance(self.root_handle, str):
-            logger.info('Handle is handle string. oas use it as root handle title')
-            if handle_title2num(self.root_handle) != 0:
-                self.root_handle_num = handle_title2num(self.root_handle)
-                self.root_handle_title = self.root_handle
+        if isinstance(self.root_handle, str):
+            try:
+                self.root_handle_num = int(self.root_handle)
+                logger.info('Handle is handle num. oas use it as root handle num')
+                if is_handle_valid(self.root_handle_num):
+                    logger.info(f'Handle number {self.root_handle_num} is valid')
+                    self.root_handle_title = handle_num2title(self.root_handle_num)
+            except ValueError:
+                logger.info('Handle is handle string. oas use it as root handle title')
+                if handle_title2num(self.root_handle) != 0:
+                    self.root_handle_num = handle_title2num(self.root_handle)
+                    self.root_handle_title = self.root_handle
         logger.info(f'The root handle title is {self.root_handle_title} and num is {self.root_handle_num}')
 
         # 获取句柄树

+ 3 - 2
module/gui/context/add.py

@@ -64,9 +64,10 @@ class Add(QObject):
         if file_path.exists():
             logger.error(f'{file_path} is exists')
             return
-        with open(template_path, 'r') as f:
+
+        with open(template_path, 'r', encoding='utf-8') as f:
             template_content = f.read()
-        with open(file_path, 'w') as f:
+        with open(file_path, 'w', encoding='utf-8') as f:
             f.write(template_content)
         logger.info(f'copy {template_path} to {file_path}')