Created
November 22, 2016 13:34
-
-
Save lyokato/5b492ab8583f95ec800fade825ddf104 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use AppleScript version "2.4" | |
use scripting additions | |
use framework "Foundation" | |
use framework "AppKit" | |
on run {input, parameters} | |
set bundle to current application's NSBundle's bundleWithPath:"/Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu/" | |
bundle's load | |
set aClass to bundle's classNamed:"AppleKeychainExtra" | |
set aObj to aClass's alloc | |
set aKeyChain to aObj's init | |
aKeyChain's performSelector:"_lockScreenMenuHit:" withObject:(null) afterDelay:0.0 | |
delay 0.01 | |
return input | |
end run |
Author
lyokato
commented
Nov 22, 2016
- Automatorでworkflow作成
- 「AppleScriptを実行」を追加して上のスクリプトを記入
- サービスは次の項目を受け取ります-> 「入力なし」
- 以上の設定でworkflow保存
- 「システム環境設定」のショートカットタブをクリック
- 左のメニューからサービスを選択
- 上で作ったworkflowが右のリストの中にあるので選択してショーカット追加
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment