[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delay in perlscripts?



"D. Hoyem" wrote:
> 
> Uli,
>   I believe that the syntax is sleep() so you would
> use sleep(60);

It's perl.  It doesn't care.  sleep has its protype (internal to perl),
so it can behave like an operator and doesn't need the parenthesis.  The
problem is that x-chat is waiting for the perl script to return, and so
x-chat doesn't do anything for those 60 seconds.  You need to get it to
sleep asynchronously, which is what the timer will do for you.

> --- Ulrich Wiederhold <U.Wiederhold@gmx.net> wrote:
> > Hello,
> > I would like to use a function like "sleep 60;" in
> > my Perlscript for
> > xchat, but if I use this function my xchat freeze.
> > Is there another function to make a delay without
> > freezing xchat?

-- 
A computer lets you make more mistakes faster than any invention in
human history -- with the possible exceptions of handguns and tequila.
    --Mitch Ratliffe
  
  -Matt
-
XChat-discuss: mailing list for XChat users
Archive:       http://mail.nl.linux.org/lists/
Posted By:     Matthew Gabeler-Lee <msg2@po.cwru.edu>