Using batkins' pearl of wisdom...
#tested - works for me (win2k)
use Win32::OLE qw( EVENTS );
my $lovespeak = new Win32::OLE( "{EEE78591-FE22-11D0-8BEF-0060081841DE
+}" ) or die "$!";
my $self = 'Monk'; # you
my $chicks_name = 'Chick'; # her
my @cheese = (
"hey $chicks_name\n\n I hope everythings going well today.\n I just wa
+nted to drop you a line.\n\nLove always,\n\t$self", "Baby,\n I just w
+anted you to know how much I love you. Youre great!\n\nLove,\n\t$self
+", "I've been thinking about you all day. I can't wait to come home t
+o you.\n talk to ya later,\n\t$self",
);
my @subjects = (
"hey babe...",
"just wanted to say hi...",
"oh I love you...",
);
my $random = int(rand($#subjects));
my $say = $subjects[$random];
$random = int(rand($#cheese));
$say .= $cheese[$random];
$lovespeak->Speak($say);
while( $lovespeak->{Speaking} ){
Win32::OLE->SpinMessageLoop();
Win32::Sleep( 100 );
}
Nothing says "I wuv you" like a robotic voice!
"What is this emotion you call 'wuv'?"
"Surely you mean, 'love'?"
"No, 'wuv', with an Earth double-u."
"This confuses and enrages us!" -Futurama
Happy St. Valentine's Day.
Update: removed the "+ 1" from the int rand.
John J Reiser
newrisedesigns.com
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|