mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
I have a bit of script, set to read a file X seconds after one message is sent and then send what is in that file. However, it's not sending the correct message. It's not reading the amount (ie $10.00)

If I don't use the timer everything works fine. But I'd like the timer.

Code:
if (%1 == recentdonor.txt) {
          set %recentdonor msg # /me $read(recentdonor.txt,n)
          msg # /me Incoming...
          .timerRecentDonor 1 10 %recentdonor
        }


The rest of the entire script works perfectly fine, and as I said this works fine without a timer. I've also tried without the "/me" and I've tried with just reading the file. For some reason, it won't read the amount no matter what if it's not a variable... At least, from what I've tried. But, I'm not worried about that. I just want it to be on a bit of a delay for the chat. Any help with it would be great. If it's not do-able that'd be great to know too. As well as why it won't if possible.

Last edited by Bramzee; 16/03/15 08:09 PM.
Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
What does a $ normally do in mirc?

Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
detects which parameter? But, with ", n" in the $read it should treat the file as plain text. Correct? I mean, it works. As long as I don't use a timer.

Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Try use this code:

Code:
if (%1 == recentdonor.txt) {
  var %recentdonor = msg # /me $replace($read(recentdonor.txt,n),$chr(36),$chr(36) $+ !)
  msg # /me Incoming...
  .timerRecentDonor 1 10 %recentdonor
}


Help details: /help $!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: Bramzee
detects which parameter? But, with ", n" in the $read it should treat the file as plain text. Correct? I mean, it works. As long as I don't use a timer.


If the n switch is specified then the line read in will not be evaluated and will be treated as plain text.

More details: /help $read


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Originally Posted By: Belhifet
What does a $ normally do in mirc?


The $ character specify an mIRC identifier like $mircexe you can use your custom like:

More details: /help $

Usage: //echo -a IS: $test

Code:
alias test { return TEST-MESSAGE }


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
thank you westor, it works. Glad to have this working, really helps with letting chat catch up to stream a bit so it's more of an all at once reaction. Also, for some reason every time I read that help file I read it as the file would be treated as plain text. Not the line itself. Thanks for pointing that out smile

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
The line was read as plain text, but the timer evaluated that text again.


Link Copied to Clipboard