Le 5 oct. 2006 à 08:53, Peter Baxter a écrit : tell application "System Preferences" activate set current pane to pane id "com.apple.preference.desktopscreeneffect" end tell tell application "System Events" tell application process "System Preferences" tell tab group 1 of window "Desktop & Screen Saver" click radio button "Screen Saver" tell group 1 tell slider 1 select value indicator 1 set value to 361.0 end tell end tell end tell end tell end tell
Hello You will not be surprised to read that I prefer this one which doesn't use language specific objects's names ;-)
tell application "System Preferences" activate set current pane to pane id "com.apple.preference.desktopscreeneffect" end tell
tell application "System Events" to tell application process "System Preferences" -- get name of every window (* { 1 -"Bureau et économiseur d'écran" } *) tell tab group 1 of window 1 -- get name of every radio button (* { 1 -- "Bureau", 2 -- "Économiseur d'écran" } *) click radio button 2 tell group 1 to tell slider 1 select value indicator 1 set value to 361.0 end tell -- slider and group end tell -- tab group end tell -- to process and System Events
Yvan KOENIG (from FRANCE jeudi 5 octobre 2006 11:12:37) |