如何以编程方式打开和关闭蓝牙,WiFi和声音在OSX [英] How to programmatically turn on and off bluetooth, wifi and sound on OSX

查看:205
本文介绍了如何以编程方式打开和关闭蓝牙,WiFi和声音在OSX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何开启和关闭WiFi和蓝牙连接,更改OSX的声音和亮度级别?

How can I turn on and off the wifi and bluetooth connections, change the sound and brightness levels on OSX?

推荐答案

只需执行正确的命令:-)你甚至可以使用AppleScript。

Simply execute the right commands :-) You could probably even use AppleScript.

  • Wifi: ifconfig en1 off or networksetup -setairportpower off
  • Bluetooth: You'll probably need http://www.frederikseiffert.de/blueutil/
  • Brightness: I found this c utility for you: http://mattdanger.net/2008/12/adjust-mac-os-x-display-brightness-from-the-terminal/

这可能是没有 exec()调用,但是这样更容易。

It's probably all possible without exec() calls, but it's easier this way.

这篇关于如何以编程方式打开和关闭蓝牙,WiFi和声音在OSX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆