(
pathpp ="D:\\pyc-tools\\ms\\newdate\\maxinfo"
DialogMonitorOPS.unRegisterNotification id:#gtMMOscenceEqualname
function callSummaryEqualname = (
---收集window句柄
windowHandle = DialogMonitorOPS.GetWindowHandle()
windowName = (UIAccessor.GetWindowText windowHandle) as String ----从窗口中找到我想要的窗口的按钮的名称
if (findstring windowName "save file as")!=undefined then (
---- 找到主窗口子控件的名称 chwindow = UIAccessor.GetChildWindows windowHandle
if chwindow !=undefined then (
for i in to chwindow.count do (
if (chwindow[i] !=) then (
kjName = (UIAccessor.GetWindowText (chwindow [i]) as String )
--- 保存配置 按下配置按钮
--print kjName
if kjName == "是(&Y)" then (
--UIAccessor.PressButtonByName WindowHandle kjName
--- 应该不错的话需要在一层监控
UIAccessor.PressButtonByName WindowHandle kjName
)
)
)
)
--print (UIAccessor.GetWindowText (chwindow [i]) as String
) false ) DialogMonitorOPS.unRegisterNotification id:#gtMMOscenceone
function callSummaryonw = (
---收集window句柄
windowHandle = DialogMonitorOPS.GetWindowHandle()
windowName = (UIAccessor.GetWindowText windowHandle) as String ----从窗口中找到我想要的窗口的按钮的名称
if (findstring windowName "Save File As")!=undefined then
(
---- 找到主窗口子控件的名称 chwindow = UIAccessor.GetChildWindows windowHandle
--print (windowName +"*****ceshi")
if chwindow !=undefined then (
for i in to chwindow.count do (
if (chwindow[i] !=) then (
kjName = (UIAccessor.GetWindowClassName chwindow[i])
--- 保存配置 按下配置按钮
--print kjName
findHandle =
if kjName == "ComboBoxEx32"then (
findHandle = chwindow[i]
---- 给手柄设置要保存的信息
savepath =pathpp ---+"\\maxinfo"
if (getDirectories savepath).count == then (
---没有路径创建路径
makeDir savepath
)
savepath += "\\"+ (getFilenameFile maxfilename)+".txt"
if findHandle != then (
UIAccessor.SetWindowText findHandle savepath
UIAccessor.PressButtonByName WindowHandle "保存(&S)" )
--- 应该不错的话需要在一层监控
---UIAccessor.PressButtonByName WindowHandle kjName
)
)
)
)
--print (UIAccessor.GetWindowText (chwindow [i]) as String
) false ---- 这里应该是最后不返回操作,可以继续的添加钩子 ) -----------------------------------------------------------------------
DialogMonitorOPS.unRegisterNotification id:#gtMMOscence function callSummary = (
---收集window句柄
windowHandle = DialogMonitorOPS.GetWindowHandle()
windowName = (UIAccessor.GetWindowText windowHandle) as String ----从窗口中找到我想要的窗口的按钮的名称
if (findstring windowName "summary Info")!=undefined then (
---- 找到主窗口子控件的名称 chwindow = UIAccessor.GetChildWindows windowHandle
if chwindow !=undefined then (
for i in to chwindow.count do (
if (chwindow[i] !=) then (
kjName = (UIAccessor.GetWindowText (chwindow [i]) as String )
--- 保存配置 按下配置按钮
if kjName == "Save to File..." then (
--UIAccessor.PressButtonByName WindowHandle kjName
--- 应该不错的话需要在一层监控
UIAccessor.PressButtonByName WindowHandle kjName
UIAccessor.PressButtonByName WindowHandle "Ok"
)
)
)
)
--print (UIAccessor.GetWindowText (chwindow [i]) as String ) true )
DialogMonitorOPS.RegisterNotification callSummaryonw id:#gtMMOscenceone
DialogMonitorOPS.RegisterNotification callSummaryEqualname id:#gtMMOscenceEqualname
DialogMonitorOPS.RegisterNotification callSummary id:#gtMMOscence DialogMonitorOPS.Enabled = true
max file summary DialogMonitorOPS.Enabled = false
DialogMonitorOPS.unRegisterNotification id:#gtMMOscence
DialogMonitorOPS.unRegisterNotification id:#gtMMOscenceone
DialogMonitorOPS.unRegisterNotification id:#gtMMOscenceEqualname
)

最新文章

  1. StringUtils方法全集
  2. Let’s encrypt 计划为网站提供免费的基本 SSL 证书,以加速互联网从 HTTP 向 HTTPS 过渡。
  3. centos6.5上安装Openfire 4.0.3
  4. radhat 6.4/centos 6.4 下编译安装 最新ruby 2.1.5
  5. RAID 0+1
  6. 《C和指针》读书笔记——第五章 操作符和表达式
  7. 最火的Android开源项目(一)
  8. UML_静态图
  9. javascript类型转换、运算符、语句
  10. EF调用sp,EF自动生成返回类型
  11. node.js系列笔记之fs模块《二》
  12. 【转发】如何使用NPM?CNPM又是什么?
  13. Cookie的使用(14)
  14. maven install 错误
  15. python-并发编程之多进程
  16. Jsoup的简易使用示例
  17. ogg跳过某个RBA
  18. .Net Core项目添加日志功能
  19. 关于 Container ,Injection
  20. Liunx 硬盘分区

热门文章

  1. Jenkins搭建.NET自动编译发布本地环境
  2. 新手,Visual Studio 2013 配置Boost库,如何编译和选择
  3. Mybatis新增mysql时中文乱码
  4. 说说 PADS Layout 中的第 20 层和 第 25层
  5. oracle之 Oracle归档日志管理
  6. mysql update 没有where 不能更新的安全保护设置
  7. Eclipse实用用快捷键
  8. 【白银组】codevs_1160 蛇形矩阵
  9. java用double和float进行小数计算精度不准确
  10. Javaweb经典三层架构的演变