Created
April 12, 2018 18:47
-
-
Save triacontane/a9f71b2b403478363ffd82e3e5c1822c to your computer and use it in GitHub Desktop.
画面をロックするスクリプトです。
This file contains hidden or 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
| if (Utils.isNwjs() && process.platform === 'win32') { | |
| var exec = require('child_process').exec; | |
| exec('rundll32.exe user32.dll,LockWorkStation'); | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
実行すると画面をロックします。パスワードを設定している場合は再入力する必要があります。
実行環境がWindowsである場合のみ動作します。ちなみになんの役にも立ちません。