turn off Bluetooth with applescript

Discussion in 'Mac Programming' started by jakkyjack, Nov 12, 2011.

  1. jakkyjack macrumors newbie

    Joined:
    Nov 12, 2011
    #1
    i have been trying to get this script to work:

    but applescript editor comes up with
    after opening system prefs and navigating to Bluetooth pane.

    any help would be appreciated, thanks.
     
  2. Partron22, Nov 12, 2011
    Last edited: Nov 12, 2011

    Partron22 macrumors 68000

    Partron22

    Joined:
    Apr 13, 2011
    Location:
    Yes
    #2
    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
    
     

Share This Page