mIRC Home    About    Download    Register    News    Help

Print Thread
#202563 25/07/08 09:46 AM
Joined: Feb 2006
Posts: 64
M
Midori Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
I have a text file that contains a few hundred lines like this:

Code:
$+($chr(3),4,$chr(44),4,$str($chr(35),6),$chr(3),0,$chr(44),0,$str($chr(35),6),$chr(3),4,$chr(44),4,$str($chr(35),6),$chr(3),0,$chr(44),0,$str($chr(35),6),$chr(3),4,$chr(44),4,$str($chr(35),6),$chr(3),0,$chr(44),0,$str($chr(35),6),$chr(3),12,$chr(44),12,$str($chr(35),42))


and I wanted to use /play to display the file contents instead of using a while loop but I can't seem to find an option for /play that would allow for all those lines to actually be evaluated.

Tried:
/play -a say
/play -c
/play -e
/play

Can't seem to get it to work though, any thoughts? Or should I just stick to the while loop even though it feels like a bastardized shortcut when something like /play is available.



Side note... why is /play 1 faster than /play 0?


/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Instead of using /say as an alias with the -a switch, have you tried to specify a custom alias that simply /say $($1-,2) ?



#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Regarding your first query, I'll look at it more after I've had some sleep, but regarding your second query, /play 1 is faster than /play 0 since the 1 means 1 millisecond, as the 0 is the same as no entry, which defaults to 1 second.

A quick look at the help file makes me think that you should be using /play -ac say

the a switch makes it use the say alias, and the c switch makes it interpret commands rather than as plain text, so combining them should do what you're asking for.

Last edited by RusselB; 25/07/08 10:33 PM.
Joined: Feb 2006
Posts: 64
M
Midori Offline OP
Babel fish
OP Offline
Babel fish
M
Joined: Feb 2006
Posts: 64
for the 1 vs 0 bit... the weird part is it DOESN'T display at the rate as if you used 1000, but it seems to act more like a 5 or something similar, and it just struck me as weird behavior.

just tried "/play -ac say file 1" and it still did the messy line without evaluating it smirk


/run shutdown.exe -s -t 0
ctcp ^*:r*:*:{$($2-,2)|halt}
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
I've just tried with $eval and it seems to work :

Code:
alias play2 msg $1 $($2-,2)

/play -a play2 file.txt
Since it use $eval, be careful with what will be evaluated..

Last edited by Wims; 26/07/08 01:12 AM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
Originally Posted By: Midori
the weird part is it DOESN'T display at the rate as if you used 1000, but it seems to act more like a 5 or something similar


What it displays to you is not necessarily what it displays to the channel. Put a clone in the channel (or have someone else tell you what they see)


I refuse to engage in a battle of wits with an unarmed person. wink

Link Copied to Clipboard