LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-29-2004, 11:59 PM   #1
eam
Member
 
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, 12:23 AM   #2
DanTheKiwi
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, 03:25 AM   #3
eam
Member
 
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.

Code:
#!/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 03:33 AM.
 
  


Reply


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 06:58 AM
Testing for enter in bash script bwysocki Programming 8 06-16-2005 09:11 AM
mozilla can not enter yahoo chat room? tacca Linux - Software 6 11-26-2004 05:49 PM
Can you su and enter pass in same command Onemessedupjedi Slackware 3 11-19-2003 09:48 PM
Can't enter the Chat Area Larry James LQ Suggestions & Feedback 4 07-31-2000 10:51 AM


All times are GMT -5. The time now is 10:03 PM.

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