Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-30-2004, 12:59 AM   #1
Registered: Nov 2003
Location: USA
Distribution: Slackware
Posts: 67

Rep: Reputation: 15
X-Chat script to enter a command every minute

Does anyone have a script for X-Chat that will enter a command at set times (I need once a minute right now)?
Old 08-30-2004, 01:23 AM   #2
LQ Newbie
Registered: Aug 2004
Location: Sydney, Australia
Distribution: FreeBSD, Fedora Core 2
Posts: 20

Rep: Reputation: 0
You could probably write one even if you don't know perl! Look at thier scripting documentation, it won't be hard at all to do.
Old 08-30-2004, 04:25 AM   #3
Registered: Nov 2003
Location: USA
Distribution: Slackware
Posts: 67

Original Poster
Rep: Reputation: 15
Ok, I started something, but I ran into some trouble. Using while (1) in my script killed X-Chat (not surprisingly)... what else could I do to make it keep checking if it's been a minute?

Here's what I have so far, I think the time part works but haven't been able to test it.

#!/usr/bin/perl -w

IRC::register("EveryMin", "1.0", "", "");

while (1) {
($sec, $min, $hour, $monthday, $month, $year, $weekday, $yearday, $isdaylight) = localtime(time);
if ($sec == 1) {
IRC::send_raw("whois smb3master\r\n");

Last edited by eam; 08-30-2004 at 04:33 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how enter the command enviroment in GUI ztdep Linux - Software 1 07-20-2005 07:58 AM
Testing for enter in bash script bwysocki Programming 8 06-16-2005 10:11 AM
mozilla can not enter yahoo chat room? tacca Linux - Software 6 11-26-2004 06:49 PM
Can you su and enter pass in same command Onemessedupjedi Slackware 3 11-19-2003 10:48 PM
Can't enter the Chat Area Larry James LQ Suggestions & Feedback 4 07-31-2000 11:51 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration