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
tell application "System Events" | |
set activeApp to first application process whose frontmost is true | |
set appName to name of activeApp | |
set plistFile to (path of alias of file of activeApp & "Info.plist") as text | |
tell property list file plistFile | |
set appVersion to value of property list item "CFBundleShortVersionString" | |
set appBuild to value of property list item "CFBundleVersion" | |
end tell | |
end tell |
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
set os_version to do shell script "sw_vers -productVersion" | |
set os_build to do shell script "sw_vers -buildVersion" | |
set macOSInfo to "macOS " & os_version & " (" & os_build & ")" |
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
$ xcrun simctl status_bar booted override --time "9:41" --batteryState charged --batteryLevel 100 --cellularMode active |
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
// tested with Sketch 53 | |
var sketch = require('sketch') | |
var doc = sketch.getSelectedDocument() | |
var selectedLayers = doc.selectedLayers | |
var selectedCount = selectedLayers.length | |
// ******* CHANGE THIS VALUE ******* | |
// 100% = 1.0 |