mIRC Home    About    Download    Register    News    Help

Print Thread
#169326 21/01/07 05:33 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
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)

THE_ADZ #169327 21/01/07 05:50 PM
Joined: Oct 2006
Posts: 342
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Oct 2006
Posts: 342
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


learn learn learn
learn3r #169333 21/01/07 06:12 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
I KNOW...but I want to divide it up into lines...automatically.

THE_ADZ #169335 21/01/07 06:14 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
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

}


-Kurdish_Assass1n
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
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

THE_ADZ #169345 21/01/07 08:10 PM
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
$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


Those who can, cannot. Those who cannot, can.
Kardafol #169347 21/01/07 08:38 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
ok...but is there a way of doing this AUTOMATICALLY

THE_ADZ #169348 21/01/07 08:39 PM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
*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

THE_ADZ #169354 21/01/07 10:30 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
There is no /AutomaticallyTurnLongTextFileLinesIntoManyShortOnes command in mIRC. You will have to find or create an alias that does it for you.

-genius_at_work

Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
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.


Those who can, cannot. Those who cannot, can.
Kardafol #169428 23/01/07 12:53 AM
Joined: Dec 2006
Posts: 37
T
THE_ADZ Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Dec 2006
Posts: 37
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


Link Copied to Clipboard