如何使用applescript访问应用程序中的下拉列表?

时间:2011-08-11 23:14:55

标签: applescript automator application-loader

我正在尝试告诉applescript打开应用程序,Application Loader,并从窗口中的下拉列表中进行选择。应该选择的项目将始终是第一个项目。我该怎么做呢? 提前谢谢。

1 个答案:

答案 0 :(得分:2)

哇我终于搞定了!我非常生气我的脚本,所以我只是放一个随机的ASCII码,它神奇地工作。我很高兴啊哈:)

activate application "Application Loader"
tell application "System Events"
    tell process "Application Loader"
        tell the first combo box of window 1
            delay 3
            keystroke (ASCII character 30)
            keystroke (ASCII character 12)
            keystroke return
        end tell
    end tell
end tell