我试图启用或禁用窗口中的所有控件,因为程序从交互模式更改为非交互模式。我怎么能问一个窗口给我所有的内容?Applescript工作室 - 我如何获得窗口中的每个控件
every control of window "mainWindow"
不工作,也不
contents of window "mainWindow"
其实,我一直没能找到任何好的文档,从界面生成器的所有菜单项进行交互。比如如何设置弹出窗口和按钮等的内容。
感谢
我这样做是在目前的方法是:
property onlineControls: {"maxLength", "speed", "accelerationSlider", "accelerationField", "showInfo"} --and so on, listing all the controls by name
on enableControls(theList, enableState)
tell window "mainWindow"
repeat with theControl in theList
set the enabled of control theControl to enableState
end repeat
end tell
enableControls(onlineControls, true)
我做的几个控制列表THT得到开启或关闭取决于程序的状态,但。它必须是硬编码的,我认为这并不是最好的方式。
“全部内容”Whoda thunk它?感谢那。 – stib 2010-05-11 12:39:06