Laocoon_ has asked for the wisdom of the Perl Monks concerning the following question:
Btw i know that thats a rather complicated approach to getting the Chat (copy to clipboard etc)for(;;){ sleep(1); $SendMessage->Call($readchat,0x00B1,0,$u); #select all chat $clipb->Empty(); #empty clipboard $SendMessage->Call($readchat,0x0301,0,0); #copy chat to clipboard $thechat = $clipb->Get(); #obtain chat from blipboard + next if $thechat !~ /\(\w{5}\)>\s(\w+)/; #Match stuff of format # "(Enter)> Some_Name" and #stores Some_Name in $1. next if $people{$1}; #next unless he is *new* $msg = "Hi $1 and welcome to my Room!"; #compose a hello message $people{$1} = 1; #Note he has entered } # --- Message is sent here --- }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Chatbot - Pattern Matching in Loop
by dragonchild (Archbishop) on Sep 07, 2001 at 00:33 UTC | |
by Laocoon_ (Novice) on Sep 07, 2001 at 02:53 UTC |