mIRC Homepage
Posted By: THE_ADZ Random topic - 21/01/07 05:33 PM
Ok....I wanna make a script like so:
[code] on 1:TEXT:!topic:#avatarrp:/msg Here's a nice topic $read(topic.mrc)
[code]
well...there is one REALLY long topic....a few lines, and it dosn't come out....how do I make it come out....or make it on many lines (automatically)
Posted By: learn3r Re: Random topic - 21/01/07 05:50 PM
Quote:
on 1:TEXT:!topic:#avatarrp:/msg Here's a nice topic $read(topic.mrc)


msg $chan/$nick
Just add to your file a fewer lines coz you can't post a new topic that exceeds(don't know how many chars) or too long..

and no need of the / you can just type
msg $chan Here's a nice topic $read(topic.mrc)
coz it's on your remotes
and much neater if you'll use .txt file instead of .mrc
Posted By: THE_ADZ Re: Random topic - 21/01/07 06:12 PM
I KNOW...but I want to divide it up into lines...automatically.
Posted By: Kurdish_Assass1n Re: Random topic - 21/01/07 06:14 PM
use $&
From the help file:
Quote:

The $& identifier

This identifier allows you to break up a single line into multiple lines which are combined when the script is performed, so you can edit long commands more easily:

longline {
echo This is an example of a long $&
line that has been split into multiple lines $&
to make it easier to edit

}
Posted By: THE_ADZ Re: Random topic - 21/01/07 06:17 PM
again.....not exactly what I am getting at.. I want it to SPLIT UP the text into many little texts. So it would do instead of:
/msg $chan SUPER LONG LINE

/msg $chan SUPER
/msg $chan LONG
/msg $chan LINE
Posted By: Kardafol Re: Random topic - 21/01/07 08:10 PM
$read(file.txt,p)

Change all the long lines to for example:
This is a very long line that has lots of unnecisairy stuff and vry bad spelling mistakes and stuff and tis really long and stuf and its longer than that and stuff and its rlly rlly o rly long bla bla bla bla bla

change it to:
This is a very long line that has lots of unnecisairy stuff and vry bad spelling mistakes | msg # and stuff and tis really long and stuf and its longer than | msg # that and stuff and its rlly rlly o rly long bla bla bla bla bla
Posted By: THE_ADZ Re: Random topic - 21/01/07 08:38 PM
ok...but is there a way of doing this AUTOMATICALLY
Posted By: THE_ADZ Re: Random topic - 21/01/07 08:39 PM
*sigh* well....I gotta go now...please e-mail me at emperoradz@gmail.com if you find something. Thanks for everyone's help though smile
Posted By: genius_at_work Re: Random topic - 21/01/07 10:30 PM
There is no /AutomaticallyTurnLongTextFileLinesIntoManyShortOnes command in mIRC. You will have to find or create an alias that does it for you.

-genius_at_work
Posted By: Kardafol Re: Random topic - 22/01/07 04:00 PM
If you can give me say, 5-10 lines of the file you're reading from (Preferably some short, and some long), then I can try to make a snippet that splits it up.
Posted By: THE_ADZ Re: Random topic - 23/01/07 12:53 AM
I asked my friend and he wrote me a script:

Code:
/t {
  ; Usage: use /split $read(file.txt) to split the file line up to multiple lines, if necessary
  ; Set length to the maximum number of characters you want sent to the channel
  var %length = 350
  var %strleft = $1-
  var %lenleft = $len($1-)
  while ( %lenleft > 0 ) {
    ; Be sure to change this next line.  Use $left(%strleft, %length) in place of your normal variable.
    /msg $chan $left(%strleft, %length)
    %lenleft = %lenleft - %length
    %strleft = $right($1-, %lenleft)
  }
}


That ^^ is basically what I was trying to do. It work GREAT laugh
© mIRC Discussion Forums