Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Keep myself off PerlMonks

by t0mas (Priest)
on Jun 15, 2001 at 16:33 UTC ( #88770=note: print w/ replies, xml ) Need Help??


in reply to Keep myself off PerlMonks

A very cool bit of code ZZamboni. I couldn't resist convering it to the wierd world of Win32 :-)

#!c:/perl/bin/perl -w use strict; use Win32::API; use PerlMonks; use PerlMonks::Users; my $n=PerlMonks::Users->new; while(1) { my %u=$n->users; if (exists($u{t0mas})) { MessageBox("What are you doing?","Get back to work!"); } sleep 300; } sub MessageBox { my ($caption,$message)=@_; my $MB_OKCANCEL = 0x00000001; my $MB_ICONERROR = 0x00000010; my $Box = new Win32::API( "user32", "MessageBoxA", "IPPN", "I"); $Box->Call(0,$message,$caption,$MB_ICONERROR|$MB_OKCANCEL); }


/brother t0mas


Comment on Re: Keep myself off PerlMonks
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://88770]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-07-05 08:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls