OS X에서 Bluetooth Discoverable 모드 (true/false)를 프로그래밍 방식으로 설정할 수 있습니까?OS X에서 블루투스 검색 가능 모드를 프로그래밍 방식으로 설정하는 방법
대신 사용자에게 켜기/끄기를 요청 하시겠습니까?
OS X에서 Bluetooth Discoverable 모드 (true/false)를 프로그래밍 방식으로 설정할 수 있습니까?OS X에서 블루투스 검색 가능 모드를 프로그래밍 방식으로 설정하는 방법
대신 사용자에게 켜기/끄기를 요청 하시겠습니까?
OS X 개인 API IOBluetoothPreferenceSetDiscoverableState를 사용할 수 있습니다.
// Declaration of private API
void IOBluetoothPreferenceSetDiscoverableState(int discoverable);
int IOBluetoothPreferenceGetDiscoverableState();
// Usage
// Turn on Discoverability
IOBluetoothPreferenceSetDiscoverableState(1);
// Get current discoverable state
IOBluetoothPreferenceGetDiscoverableState()
또한 켜기 및 블루투스 오프 API를 유용하게 찾을 수 있습니다 :
void IOBluetoothPreferenceSetControllerPowerState(int powered);
int IOBluetoothPreferenceGetControllerPowerState();
TELL 응용 프로그램 "시스템 환경 설정"
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
끝이 도움이 될 것입니다 블루투스 visibility.Hope를 ON/OFF 스위치 것
이 애플 스크립트를 말한다.