mIRC Home    About    Download    Register    News    Help

Print Thread
Remote Script Help #215715 03/10/09 02:39 AM
Joined: Oct 2009
Posts: 5
M
Mittens Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2009
Posts: 5
Okay, so, I'm pretty new to all this scripting stuff, but learning, with some help. I've been trying to fashion a set of remote scripts that will be used to send me messages if I leave a PM window sitting without responding for 5 minutes. My current method of doing this is using two remote scripts, one to write a timer for every PM I get, one to stop that timer when I respond. However, The first one, to write the timer, doesn't -always- work (though it does sometimes) and also seems to work oddly if I change names. The second one simply does not do what I want it to do. Here are the scripts:

on *:TEXT:*:?:/timer $+ $nick 1 300 /echo 7 -a Don't forget about $+ $chr(32) $+ $nick $+ , woman!
on *:INPUT:?:/timer $+ $target off

Any ideas? Thanks in advance.

Re: Remote Script Help [Re: Mittens] #215721 03/10/09 05:20 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on *:TEXT:*:?:.timer $+ $me 1 300 echo 7 -a Don't forget about $me $+ , woman!
on *:INPUT:?:.timer $+ $me off

Re: Remote Script Help [Re: Mittens] #215724 03/10/09 05:45 AM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
I would use
Code:
on *:TEXT:*:?:.timer $+ $server $+ $nick 1 300 echo 7 -a Don't forget about $nick $+ , woman!
on *:INPUT:?:.timer $+ $server $+ $active off

Last edited by Wims; 03/10/09 05:45 AM.

Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Remote Script Help [Re: Mittens] #215729 03/10/09 03:59 PM
Joined: Oct 2009
Posts: 5
M
Mittens Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2009
Posts: 5
Well, I've got the first part of the script working. I realized that the reason it wasn't always working was because it was an on TEXT script, and I had no on ACTION script. So now I have these, and they work fine:
Code:
on *:TEXT:*:?:/timer $+ $server $+ $nick 1 300 echo 7 -a Don't forget about $nick $+ , woman!
on *:ACTION:*:?:/timer $+ $server $+ $nick 1 300 echo 7 -a Don't forget about $nick $+ , woman!

However, the second part of the script still does not work. It also seems that a should-be-simple script that just says:
Code:
on *:INPUT:?:/echo 7 -a Hi.
doesn't work, so do I just have on INPUT format wrong, or something?
Thanks again.

Re: Remote Script Help [Re: Mittens] #215730 03/10/09 04:19 PM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
You probably have another similar definition of an on input event before this one in the file, try to put you on action/text/input event in a new file


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Remote Script Help [Re: Mittens] #215732 03/10/09 07:57 PM
Joined: Oct 2009
Posts: 5
M
Mittens Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2009
Posts: 5
That did it. Without the other input interfering, it now works fine.
However, every time I respond to the person a timer was started for, it gives me the message that the timer has been turned off. Unless someone knows how to silence this message so I don't have to see it in the PM window, I'm scrapping this idea for a script.

Re: Remote Script Help [Re: Mittens] #215733 03/10/09 08:04 PM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
add a . to a command to turn off the output of this command, use ".timer" instead of "timer"


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Remote Script Help [Re: Mittens] #215734 03/10/09 08:24 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Originally Posted By: mirc.hlp
If you want to force a command to perform quietly ie. without printing out any information, then you can prefix it with a "." full stop.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Remote Script Help [Re: Mittens] #215735 03/10/09 09:15 PM
Joined: Oct 2009
Posts: 5
M
Mittens Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2009
Posts: 5
Oh, well then! I suppose I should have looked into that myself. :P
Thank you all for all the help, as far as I can tell the script works great now.

Re: Remote Script Help [Re: Mittens] #215740 04/10/09 04:22 AM
Joined: Oct 2009
Posts: 5
M
Mittens Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Oct 2009
Posts: 5
If anyone is interested in this script, here is the final product that works as well as I think is necessary. I may have missed something, however.
Code:
on *:TEXT:*:?: {
  .timer $+ $server $+ $nick 1 300 echo 7 -a Don't forget about $nick $+ !
  .set %rem. $+ $nick 1
}
on *:ACTION:*:?: {
  .timer $+ $server $+ $nick 1 300 echo 7 -a Don't forget about $nick $+ !
  .set %rem. $+ $nick 1
}
on *:NICK: {
  if ($($+(%,rem.,$nick),2) == 1) {
    .timer $+ $server $+ $nick off
    .timer $+ $server $+ $newnick 1 300 echo 7 -a Don't forget about $newnick $+ !
  }
}
on *:INPUT:?: {
  .timer $+ $server $+ $active off
  .set %rem. $+ $active 0
}

Re: Remote Script Help [Re: Mittens] #215744 04/10/09 05:41 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Suggested alternative
Code:
on *:TEXT:*:?: {
  .t $server $nick
}
alias -t {
  $+(.timer,$1,$2) 1 300 echo 7 -a Don't forget about $nick $+ !
  set $+(%,rem,$2) 1
}
on *:ACTION:*:?: {
  .t $server $nick
}
on *:NICK: {
  if ($($+(%,rem.,$nick),2) == 1) {
    $+(.timer,$server,$nick) off
    .t $server $newnick
  }
}
on *:INPUT:?: {
  $+(.timer,$server,$nick) off
  unset $+(%,rem,$nick)
}


Re: Remote Script Help [Re: RusselB] #215755 04/10/09 05:38 PM
Joined: Jul 2006
Posts: 3,568
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,568
I don't understand why so often people do make (wrong in this case) reply when it's not needed, his code can be better because he could use $timer instead of dynamic global var, but I think he don't care about that when he said "final"


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net