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

Jolly Jimmy

macrumors 65816
Original poster
Dec 13, 2007
1,357
3
I found someone elses script (knowing nothing about scripting myself) that accomplishes this perfectly except that every so often it returns a "unable to turn bluetooth off" error, even though it does anyway. It mainly seems to happen when I run it for the first time after booting up. Can someone who knows what they're doing help me tweak the script and get rid of this annoying error?

Here's what I've got at the moment (requires this small utility by the way)



set bt_status to do shell script "/usr/local/bin/blueutil 'status'"

if bt_status is "Status: off" then
do shell script "/usr/local/bin/blueutil 'on' "
else
do shell script "/usr/local/bin/blueutil 'off' "
end if



Thanks for any help!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.