Created
May 15, 2016 10:40
-
-
Save s2terminal/1ae1c77784ef9a57a3cddc611bccf599 to your computer and use it in GitHub Desktop.
Macのメモリ解放用JXA(JavaScript for Automation)
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
var app = Application.currentApplication(); | |
app.includeStandardAdditions = true; | |
app.doShellScript("sudo purge", {administratorPrivileges:true, withPrompt:"sudo purge"}); | |
app.displayDialog("purged"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
参考:
http://stackoverflow.com/questions/35384757/jxa-equivalent-of-with-administrator-privileges/35393194