fn AutoPressOK flag:true = ( 
        if flag then (
                DialogMonitorOPS.unRegisterNotification id:#autoPressYes
                fn autoPressOK = (
                        WindowHandle = DialogMonitorOPS.GetWindowHandle()
                        if UIAccessor.GetWindowText WindowHandle == "File Exists" do (
                                skinBoneCtrls = UIAccessor.GetChildWindows WindowHandle 
                                for hand in skinBoneCtrls where UIAccessor.GetWindowText hand == "Yes" do UIAccessor.PressButton hand 
                        )
                        true
                )
                DialogMonitorOPS.RegisterNotification autoPressOK id:#autoPressYes
                DialogMonitorOPS.Enabled = true
                --DialogMonitorOPS.ShowNotification()
        )
        else(
                DialogMonitorOPS.unRegisterNotification id:#autoPressYes --不应该将其简单的注销,否则所有窗口都将显示不正常
                DialogMonitorOPS.Enabled = false                             --一定要关闭窗口自动操作
        )
)
AutoPressOK ()

 

相关文章:

  • 2022-03-05
  • 2021-10-09
  • 2021-12-02
  • 2021-06-06
  • 2021-11-27
  • 2021-06-24
猜你喜欢
  • 2021-11-22
  • 2021-11-13
  • 2021-12-18
  • 2022-02-08
  • 2021-07-21
  • 2022-12-23
相关资源
相似解决方案