[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Background Talker



Modified from an example (by Chris Nandor) on the MPPE CD-ROM.  Speaks in 
3 minute intervals.
Command-. in MacPerl to silence it.  Working on reading in random lines 
from a text file.  Possible other application, combine with the 
process-watcher of my previous post, and speak the names and sizes of all 
currently running apps at regular intervals.

#!perl -wl

use Mac::Apps::Launch;
use Mac::Speech;

Hide('MacPerl', 1) or warn $^E;

my $channel = NewSpeechChannel($Voice{Victoria});

for (;;) {
  SpeakText($channel,'Hi there!');
  while (SpeechBusy()) {}
  sleep(240);
}

END{DisposeSpeechChannel($channel)}

--B

Brian McNett, Webmaster
*************************************************************
Mycoinfo. The world's first mycology e-journal.
http://www.mycoinfo.com/
*************************************************************


# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org