Quantcast
Channel: Blind Planet» chrisnorman7
Viewing all articles
Browse latest Browse all 2

Making VoiceOver announce the time and date on your Mac

$
0
0

This is an updated and refined version of this guide, now that I've learned a little more, and stopped being so confused.

So we all know about the keyboard commander, and how you can make it read the time when you press option + t, but I personally find that method really really slow. In addition, for me at least, the date doesn't even read some times. So I set to making my own solution.

So, if you've got VoiceOver controllable by Applescript (in the General tab), you can make it say stuff etc.

Note: The reason this is v2 of this guide, is the following run from AppleScript editor, although working, will not work...

tell application "voiceover" to output "Hello world."

This is because AppleScript editor makes VoiceOver say "Run", after the script has been executed, thus you don't hear what you told VoiceOver to say.

Anyways, here's my updated time script, which you just need to point a keyboard command, quicknav key, or any other trigger of your choosing towards:

tell application "VoiceOver" to output (do shell script "date +\"%d %h %Y, %H %M %S\"")

In addition, as a bonus for me being so stupid and not getting VoiceOver to talk before, here's my other scripts:

Battery.scpt:
tell application "VoiceOver" to output (do shell script "pmset -g batt")

Disk Usage.scpt:
tell application "VoiceOver" to output (do shell script "df -h | head -2 | tail -1")

Date Reader.scpt:
tell application "VoiceOver" to output (do shell script "date +\"%d %h %Y, %H %M %S\"")

Memory.scpt:
tell application "VoiceOver" to output (do shell script "memory_pressure | grep \"memory free\"")

Ping.scpt:
tell application "VoiceOver" to output (do shell script "if ping -c1 bbc.co.uk > /dev/null;
then msg=\"up\";
else msg=\"down\";
fi;
echo \"Net is $msg\"")

Note: You have to send ping's output to /dev/null (nowhere), otherwise VoiceOver reads all that too.

Enjoy, and happy hacking.

Tags: 


Viewing all articles
Browse latest Browse all 2

Trending Articles