Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6945341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:25:26+00:00 2026-05-27T13:25:26+00:00

Is there a way to programmatically turn on and off the Bluetooth connection on

  • 0

Is there a way to programmatically turn on and off the Bluetooth connection on OSX in a way that will be accepted by the Mac App Store?

From my previous question, I’ve found about blueutil, but it uses private APIs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:25:26+00:00Added an answer on May 27, 2026 at 1:25 pm

    It would be somewhat surprising if Apple approved an app that modified the user’s antenna settings. It sounds like the kind of thing they typically frown on, no matter how you do it. But then, sometimes I get surprised.

    You can definitely do it through Applescript:

    tell application "System Preferences"
        set current pane to pane "com.apple.preferences.Bluetooth"
        tell application "System Events"
            tell process "System Preferences"
                set isOnCheckbox to checkbox "On" of window "Bluetooth"
                if value of isOnCheckbox is 0 then
                    click isOnCheckbox
                end if
            end tell
        end tell
        quit
    end tell
    

    Note that this will take over System Preferences and at the end close it even if the user was running it. That’s not the best user experience, and I definitely wouldn’t do it without first warning the user. But of course, I wouldn’t recommend modifying the bluetooth settings without warning the user.


    EDIT

    Because you asked, I’ll take a moment to rant here….

    Regarding how to learn to read and write the above, first note that it, like most AppleScript I write professionally, was cobbled together from google searches and experimentation. I’m a purist programmer at heart, and I believe in really understanding the technology you use. Even I cobble together things in AppleScript until they “kind of work.”

    I wish there were a really good document. Of course there’s the language guide, but it’s kind of like learning Cocoa from the ObjC language definition. My current recommendations are Beginning AppleScript and then AppleScript: The Definitive Guide. Neuburg in particular does not sugarcoat the language or pretend that it makes sense. Applescript, even worse than the original COBOL (ADD X TO Y GIVING Z), is very hard to write because it tries so hard to be easy. I love and respect many languages. AppleScript is crap.

    It is, however, the most supported way to interact with most of the Mac system functions, so a good Mac developer needs to at least be able to get by in it. Even if you use the new ScriptingBridge via ObjC (or MacRuby), the underlying object model is still AppleScript based. In my experience, to get ScriptingBridge code to work well, you generally have to write it first in AppleScript and then translate it into Cocoa.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to programmatically turn off that autosuggest list which pops up
Is there a way to programmatically turn off font smoothing/antialiasing on OS X?
Is there a way to turn ON UAC programmatically with C#? I know, everyone
Is there a way to programmatically disable usb storage devices from working while still
Is there a way to programmatically access the application instance id? When an app
Is there a way to programmatically reach into the BIOS and turn on the
Is there a way to programmatically pause my Chrome extension from all of it's
Is there any way (programmatically) that i can find the location of Resource folder.
Is there a way to programmatically download a single file from a remote git
Is there a way to programmatically create a compressed folder in Windows? I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.