Display system uptime in a Finder dialog |
|
|
I was thinking that there must be an easier way than going to Terminal and typing uptime in order to find out how long my machine had been up. So I wrote a wee AppleScript that gives the answer in the form of a Finder dialog window. Stick this into Script Editor, and save it as Application (or Application Bundle).
set output to do shell script "uptime"
tell application "Finder"
display dialog output buttons {"OK"} default button 1
end tell
If you wish, you can then add a shortcut to it from your launcher. Voila, uptime and load averages at your findertips (literally).
[robg adds: This is a very simple hint, but one that demonstrates to new AppleScript users how to display the output from any Terminal command in a dialog. For uptime, and many other Terminal commands whose output I'd like to see on occasion (such as the results of the last Time Machine backu...
|