プログラムがインタラクティブモードから非インタラクティブモードに変わるときに、ウィンドウ内のすべてのコントロールを有効または無効にしようとしています。ウィンドウにすべてのコンテンツを提供するように依頼するにはどうすればよいですか?
every control of window "mainWindow"
動作しません、また動作しません
contents of window "mainWindow"
実際、InterfaceBuilderのメニュー項目を操作するための適切なドキュメントをまったく見つけることができませんでした。ポップアップやボタンの内容の設定方法など。
ありがとう
私が現時点でそれを行う方法は次のとおりです。
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)
プログラムの状態に応じてオンまたはオフになるコントロールのリストをいくつか作成しました。ただし、ハードコーディングする必要があり、最善の方法とは言えません。