mIRC Home    About    Download    Register    News    Help

Print Thread
#67568 12/01/04 12:14 PM
Joined: Jul 2003
Posts: 14
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 14
help me on this please? anyone? when a user typed a long text, i doesnt seems to wrap it but instead cut off.

Code:
  
on ^*:TEXT:*:#:{
  var %a = 1,%b $wrap($1-,ProFontWindows,9,$calc($window($active).dw - 10),0)
  echo -mlbfri $chan $times(EVENT) $nick($chan,$nick).pnick says: $wrap($1-,ProFontWindows,9,$calc($window($active).dw - 10),1)
  while (2 <= $wrap($1-,ProFontWindows,9,$calc($window($active).dw - 10),0)) {
    echo -mlbfri $chan $times(EVENT) $nick($chan,$nick).pnick says: $wrap($1-,ProFontWindows,9,$calc($window($active).dw - 10),%a)
    inc %a 
  }
  haltdef
}


Best regards,
Ken
#67569 12/01/04 02:27 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
you sure that doesnt lock your mirc up altogether?

I dont see an exit to the while loop, i think it should be looking like this...

Code:
 
on ^*:TEXT:*:#:{
  var %a = 1
  var %b = $wrap($1-,ProFontWindows,9,$calc($window($active).dw - 10),0)
  while (%a <= %b) {
    echo -mlbfri $chan $times(EVENT) $nick($chan,$nick).pnick says: $wrap($1-,ProFontWindows,9,$calc($window($active).dw - 10),%a)
    inc %a
  }
  haltdef
} 

#67570 12/01/04 03:15 PM
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
I see you using echo -i

when wrapping text you need to add an N to that: echo -iN

for example: echo -i3


If it ain't broken, don't fix it!
#67571 12/01/04 04:07 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
-i is all u need, there is no need to have a value following it, it defaults to 2

#67572 13/01/04 01:07 AM
Joined: Jul 2003
Posts: 14
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 14
ok lets make this clear, echo -i[N] only allow to 25. I want my effect to be align like this below:
Code:
  
  09:05a  regatria says: I want my long text to be wrap to the 
                       : next line like this. ok lets make this
                       : clear, echo -i[N] only allow to 25. 
                       : I want my effect to be align like this 
  09:06a               : below:


Best regards,
Ken
#67573 13/01/04 01:51 AM
Joined: Jul 2003
Posts: 14
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 14
erm,

Code:
on ^*:TEXT:*:#:{ 
  var %a = 2 
  var %b = $wrap($1-,ProFontWindows,9,$calc($window($active).dw),0)
  echo -mlbfr $chan $times(EVENT) $nick($chan,$nick).pnick says: $wrap($1-,ProFontWindows,9,$calc($window($active).dw),1)  
  while (%a <= %b) {
    echo -mlbfr $chan $times(EVENT) $str($chr(160),$calc($len($nick($chan,$nick).pnick) +4)) : $wrap($1-,ProFontWindows,9,$calc($window($active).dw),%a) 
    inc %a
  }
  haltdef
} 

 


this works. but when i paste my codes which is also. it doesnt wrap anymore.. any ideas?


Best regards,
Ken
#67574 14/01/04 12:01 PM
Joined: Jul 2003
Posts: 14
R
Pikka bird
OP Offline
Pikka bird
R
Joined: Jul 2003
Posts: 14
ANYONE CAN HELP? :s


Best regards,
Ken

Link Copied to Clipboard