Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2015-11-30 09:08 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (767 votes), past polls