AppleScript/System Events
AppleScriptでGUIを操作する為の機構。 使用する為には予め「システム環境設定->ユニバーサルアクセス->画面表示->補助装置を使用可能にする」にチェックを入れておく。
- Apple - Software - AppleScript - GUI Scripting
- Apple - Software - AppleScript - GUI Scriptingの中ほどのリンクからUI Element Inspectorを手に入れておくと便利。
例
「プロセッサのパフォーマンス」を「自動」に
tell application "System Preferences" activate set current pane to pane "com.apple.preference.energysaver" end tell tell application "System Events" tell process "System Preferences" set awin to tab group 1 of window "省エネルギー" click radio button "オプション" of awin click pop up button 1 of awin click menu item 1 of menu 1 of pop up button 1 of awin end tell end tell tell application "System Preferences" to quit
Last modified:2006/12/31 21:18:12
0.071862