前述のMacユーティリティ近接Macと互換性のあるデバイスでBluetooth接続が作成されている場合、アクションを実行するのに非常に便利です。 applescriptermech142つのスクリプトをまとめて、近くに近くを使用して、近くにいるときにMacをロックしてロック解除し、素晴らしいものを提供しますubuntu-likeセキュリティシステム。
Mech14はスクリプトを作成したので、Bluetooth接続が作成されたときに音楽を再生して一時停止しますが、それはオプションです。それを動作させるには、近接のアクションとして彼のApplescriptsを設定するだけです。これがあなたのマシンのロックを解除するものです:
--tell application "iTunes" to play--This is optional; if you want to play music when you are in the proximity of your computer, it will play ur music. Just delete the 2 minus signs in front of '--tell application "iTunes" to play'tell application "System Events"tell security preferencesset require password to wake to falseend tellend telltell application "ScreenSaverEngine" to quit
そしてそれをロックするもの:
--tell application "iTunes" to pause--again, this is optional, but if iTunes is playing, you might want to pause it; delete '--'tell application "System Events"tell security preferencesset require password to wake to trueend tellend tell-- start screensaver (which locks the screen)activate application "ScreenSaverEngine"
どちらもダウンロード可能ですここ読み取り私のファイルを使用していますが、詳細な手順とカスタマイズオプションについては、Mac OS Xの完全な投稿をご覧ください。
Bluetooth検出を使用してMacをロックおよび解除します| Mac OS Xは介してヒントを示します@cole_morgan