Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jakkyjack

macrumors newbie
Original poster
Nov 12, 2011
1
0
i have been trying to get this script to work:

tell application "System Preferences"
activate
end tell

tell application "System Preferences"
activate
set current pane to pane "com.apple.preferences.Bluetooth"

tell application "System Events"

tell process "System Preferences"
click radio button "On" of window "Bluetooth"

tell application "System Preferences"
quit
end tell


end tell

end tell
end tell

but applescript editor comes up with
System Events got an error: Can’t get radio button "On" of window "Bluetooth" of process "System Preferences".
after opening system prefs and navigating to Bluetooth pane.

any help would be appreciated, thanks.
 
The "On" button isn't a radio button, it's a checkbox.
Try this:
Code:
tell application "System Events"
	click checkbox "On" of window "Bluetooth" of application process "System Preferences"
end tell
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.