mIRC Homepage
Posted By: landonsandor /play question - 25/04/05 05:01 PM
Is there a simple way thru the /play command to play from X line to Y line? I hadn't noticed that as a /play option?
Posted By: DaICeMaN Re: /play question - 25/04/05 05:04 PM
/play -thelp1 help.txt

will play all the text under a ini file topic

In the help.txt file you would have:

[help1]
line1
line2
line3

[help2]

might be usefull for ya i dunno
Posted By: Riamus2 Re: /play question - 25/04/05 05:20 PM
There does not seem to be a specific option to do this. Unless someone knows of a way that isn't listed in the HLP, your best option will probably be to $read the range of lines into a new file, play it, then /remove that new file. I'm not sure exactly what you are doing, but it sounds like that may be a simple way to handle it.
Posted By: FiberOPtics Re: /play question - 25/04/05 08:45 PM
Indeed there isn't such an option, but with the use of filter, this is a fairly easy task.

Here's an example:

//filter -ffcr 5-9 versions.txt tmp | play -se tmp | .remove tmp

That would play lines 5-9 from the versions.txt (if you have that in your main mIRC folder) to the status window.

The filter flags are as follows:

f = input is a file
f = output is a file
c = clear outfile before outputting data to it (just in case if the file would exist)
r = specify a range m-n of lines

The temp file is immediately removed, even during the playing of the output. That's because the contents are first loaded into memory when using /play.

Greets
Posted By: landonsandor Re: /play question - 25/04/05 09:38 PM
Yes I saw that - and thinking more onit, this MAY do what I want (writing a script for somebody else). It sure would be nice tho if we could just specify line numbers to read smile


Fiber - interesting idea. I might give that a shot as well. Thanks for the other option
Posted By: MikeChat Re: /play question - 26/04/05 04:46 AM
if the contents can be set in catagories then you could use topic play
Code:
  
[topic1]
line of info
another line
[topic2]
this is topic #2
information is as follows
and so on
[]

then /play -ttopic1 test.txt (or whatever you have named the text)
© mIRC Discussion Forums