First, find Automator in the application, select the document type as the service, and click Select. The steps are as follows:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/48/70/wKiom1QIMO3zqzAzAAXENqL2r-8900.jpg "Title =" screen snapshot 5.28.38.png "alt =" wKiom1QIMO3zqzAzAAXENqL2r-8900.jpg "/>
Enter run in the search box and double-click Run shell script, for example:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/48/70/wKiom1QIMdfAX4QyAAOZVB9M6Lo875.jpg "Title =" 2014-02014-02014-02014-09-04 4255.32.45.png "alt =" wkiom1qimdfax4qyaaozvb9m6lo875.jpg "/>
Select "no input" from the selected text received by the Service, and enter the following in the shell script box:
'/System/library/coreservices/menu extras/user. Menu/contents/resources/cgsession'-Suspend
Display:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/48/70/wKiom1QIMomw_jElAAFcNGt1Ktc376.jpg "Title =" screen snapshot 2014-09-04 4255.35.50.png "alt =" wkiom1qimomw_jeleafcngt1ktc376.jpg "/>
On the top menu bar, choose File> storage, name it lock screen, and click storage, for example:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/48/70/wKiom1QIMyPjSvpDAAGi9-aNkvQ229.jpg "Title =" screen snapshot "alt =" wKiom1QIMyPjSvpDAAGi9-aNkvQ229.jpg "/>
Then, choose System Preference Settings> keyboard> shortcut key> Select Service on the left> lock screen on the right, and double-click the shortcut key. What I entered is: "command-control-L ", for example
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/48/70/wKiom1QINF2DWY3hAAJ6XGSnvj0614.jpg "Title =" 2014-02014-02014-02014-09-04 4255.43.24.png "alt =" wkiom1qinf2dwy3haaj6xgsnvj0614.jpg "/>
The setting is over. Press the shortcut key "command-control-L" to try the setting.
This article is from the "7803002" blog, please be sure to keep this source http://7813002.blog.51cto.com/7803002/1548855
Set the screen lock shortcut in Mac OS