I’m trying to learn Applescript and have been playing around with controlling the System Preferences Application -specifically the SOUND pane. All I want to do is create a script to select an alert sound. Here is the script so far:
tell application “System Preferences”
activate
end tell
tell application “System Events”
tell process “System Preferences”
click menu item “Sound” of menu “View” of menu bar 1
delay 2
click radio button “Sound Effects” of tab group 1 of window “Sound”
click text field 1 of row 4 of table 1 of scroll area 1 of tab group 1 of window “Sound”
end tell
end tell
The line: click text field 1 of row 4 of table 1 of scroll area 1 of tab group 1 of window “Sound”
doesn’t seem to work. I’m trying to have applescript click on the 4th alert sound (Frog) but it does nothing. I’ve also tried using the “click at {x,y}” command with the proper x,y for the text at the 4th row and it doesn’t work either. Am I just stupid or perhaps there are problems with the UI Script Beta? Please oh please can someone help me? Thanks!
Scott