AppleScript:在向上/向下发送按键之前将焦点设置为滑块

时间:2014-05-24 16:31:35

标签: applescript

我有一个带有三个组和几个元素的接口的应用程序。第1组包含一个带有值指示符1的滑块1(由UI浏览器提取)。

我已经设法使用按键操作滑块:

  tell application "GLM" to activate
  tell application "System Events" to tell application process "GLM Intel"
      tell group 1 of window 1      
         tell slider 1
             repeat 2 times
                 key code 125
                 delay 0.1
             end repeat
         end tell
      end tell
  end tell

但是,只有滑块已经具有焦点时,这才有效。如果我使用鼠标操作组2中的任何对象,则脚本将停止工作。

我尝试通过AppleScript单击滑块1和/或值指示器1,但这不起作用。任何提示深深感激!

0 个答案:

没有答案
相关问题