Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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 wandering the Monastery: (11)
As of 2014-10-01 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (38 votes), past polls