mIRC Home    About    Download    Register    News    Help

Print Thread
#4966 05/01/03 12:38 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline OP
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
I have a couple of questions on Custom Windows

Is it possible to word wrap a sentence to fit into a window? I know the -p switch will wrap the line if it is too long but it will not fit into the window.

Next is there a way to insert aline at the top of a custom window instead of the bottom of the window?




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#4967 05/01/03 05:18 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I use /aline -ahp @Server $1- for all my server notices

-p is the wrap-text switch, as you stated though it works for me quite well.

#4968 05/01/03 07:05 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
As you noted, /aline -p wraps the line but it does a horrid job of wrapping the first line. It's fine for very short lines or lines that are in a very large window.

That is why I almost always use /echo -ti2 @Window <insert a very long line here>. It wraps much better, plus it indents 2 spaces (like the rest of mIRC's windows) if it does wrap, something -p is incapable of doing.

As for your other problem of inserting a line on line 1, you can use: /iline [color:#840017][[/b]ColorNumber] @Window [LineNumber] <this is your text>


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#4969 05/01/03 07:30 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline OP
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
I appreciate your help Watchdog

The -p switch will not fit the whole line into the window. even when I have the window opened up all the way. So I have to copy the line to paste it onto a text to read it. There are no scroll bars to read the end of a line and the -p switch does not work in this script. I get one long line where I can't read it Maybe there is something in the code. You tell me?

Code:
 
On *:OPEN:*:*: {
  if (($nick isop $comchan($nick,1)) || ($me == $nick)) { halt }
  var %i = 1
  while (%i &lt;= $lines(spam.txt) ) {
    if ($read(spam.txt,%i) isin $strip($lower($1-),burc)) {
      if ($window(@TEST) == $null) { //window -el @TEST }
      aline -ahp @TEST 2OPEN7 # $nick $1-
      ban -u30 $comchan($nick,1) $nick 2 
      kick $comchan($nick,1) $nick 5K4ick5 04 $+ %kick.cnt 
      inc %kick.cnt 1 
      .guser 11 $nick 2
      closemsg $nick 
      return
    }
    inc %i
  }
}
 


this is what I see in bold, as one long line in my @TEST Window. I want to beable to read the whole line so I know why my script ban someone


2OPEN7 ^^[james_bond]^^ Want warez? games, movies, apps,clips,full alboms, isoz, 0days, mp3z,
sex and much more full downloads [alot of games] at: [color:blue]http://www.somehorridplace.com

[/color]

Last edited by Hammer; 05/01/03 07:33 AM.



Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#4970 05/01/03 07:50 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline OP
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Thanks Hammer But I still get the same problem.... Maybe this is a problem for the bug report maybe Khaled can fix the problem with in the next version of mirc




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#4971 05/01/03 07:58 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I see what you mean. The same thing may happen to me though I won't notice it as most server notices are fairly short. Only rants via /globops are excessive and not used often enough for me to check the wrap issue. I might try a few experiments tonight and see how I go.

I'm going to try Hammer's idea too as I didn't think /echo was an option for custom windows. It's all good.

#4972 05/01/03 08:16 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline OP
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Hammers suggestion does what I want for a echo command but I do not want to stay up all night watching for echo msgs... hehehe Sorry Hammers 8o{




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#4973 05/01/03 09:39 AM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
When I have the energy I boot a second mIRC and simulate the condition I want to trigger a script.

When I simply can't be bothered I let the script sit there (I'm online 24/7 anyway) and just sleep while the script sort's itself out. In the morning after brekky I will check on things then.


Link Copied to Clipboard