无法获取可能无法编写脚本的应用程序的窗口

问题描述

我一直试图在Anki中自动勾选一个复选框,但运气不好,这是几个小时的代码

tell application "Anki"
    set pane to "com.Anki.Add.Fields..."
end tell


set SWindow to "Fields for Cloze arabic"



tell application "System Events"
    tell process "Anki"
        -- get the correct row number of the sharing services
        repeat with theRow in every row of table 1 of scroll area 1 of group 1 of window SWindow
            select theRow -- select the row
            if value of checkBox 3 of theRow is 0 then click checkBox of theRow -- click on activate check Box if not yet set
        end repeat
        delay 1 -- time to display the correct pane with the users for sharing
        click radio button 1 of radio group 1 of group 1 of window SWindow -- click the button "all users"  
    end tell
end tell

请注意,我从该线程How do I use applescript to get this checkmark clicked复制粘贴了代码

我收到一条错误消息:

系统事件出现错误:无法显示窗口“阿拉伯语的字段” “ Anki”的过程。

以下是一些我想自动化的屏幕截图: enter image description here

enter image description here

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...