|
Joined: Dec 2002
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2002
Posts: 68 |
I have a dialog and it is filled with text from a txt file. I am wondering how I can wrap this so you don't have to scroll to the side. I looked at $wrap but I did not understand it. Please help. Thanks.
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
It the text in the dialogue itself or an edit box? Since you mention scrolling I will (cautiously) predict an edit box. Try the 'multi' style.
|
|
|
|
Joined: Dec 2002
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2002
Posts: 68 |
Yes it is an edit box. But mutli will make it so you still have to scroll to the side to read it all (since thats how its like in the .txt). I could just edit the .txt file so it wont (since the info in there wont change), but I will be using a lot of these, so it'll be easier if there is a way to do it in mIRC.
Also removing the horizontal bar will just remove the text after that.
Here is my editbox:
edit "", 11, 0 38 135 164, tab 9 read multi return vsbar
Last edited by phrozenfire; 14/03/03 04:47 PM.
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
I just tried $wrap and all it does it restrict it further, same with the "limit N" style. I don't think $wrap is for dialogues in any case. I guess I will wait along with you to hear other suggestions. I've been wanting much the same thing you want for the topic changer in my channel central dialgue for a while and it would be a worthwhile improvement.
|
|
|
|
Joined: Mar 2003
Posts: 23
Ameglian cow
|
Ameglian cow
Joined: Mar 2003
Posts: 23 |
dialog nick {
title "mIRC"
size -1 -1 300 200
option dbu
edit $read(abcd.txt) ,1, 0 0 150 150, style (multi, vsbar, autovs)
button ,2, 12 12 12 12,hide,ok
}
Contents of abcd.txt aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb no problem with it ... it auto wrap it
|
|
|
|
Joined: Dec 2002
Posts: 68
Babel fish
|
OP
Babel fish
Joined: Dec 2002
Posts: 68 |
Problem is that I have one editbox, and they choose from a dropdown combo box what displays in the editbox. Each item in the dropdown combo box is a different .txt file.
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
Good stuff, damn thing was right under my nose too. I was working with autohs instead. Much appreicated. I won't paste my channel central script here though, it's 2300 lines worth.
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
if ($did(yourdialog,id).sel == 1) {
did -a yourdialog id Text file 1
}
if ($did(yourdialog,id).sel == 2) {
did -a yourdialog id Text file 2
}
if ($did(yourdialog,id).sel == 3) {
did -a yourdialog id Text file 3
}
|
|
|
|
Joined: Mar 2003
Posts: 23
Ameglian cow
|
Ameglian cow
Joined: Mar 2003
Posts: 23 |
dialog nick {
title "mIRC"
size -1 -1 300 200
option dbu
edit "" ,1, 0 0 150 150, style (multi, vsbar, autovs)
combo 2, 200 10 50 20, style (sort,drop)
button ,99, 12 12 12 12,hide,ok
}
on 1:dialog:nick:init:0: {
did -a nick 2 abcd
did -a nick 2 efgh
}
on 1:DIALOG:nick:sclick:2:{
if ($did(2).seltext == abcd) { $filledit(abcd.txt) }
elseif ($did(2).seltext == efgh) { $filledit(efgh.txt) }
}
alias filledit {
var %x = 1
while (%x <= $lines($1)) {
if (%x=1) { did -ar nick 1 $read($1,%x) }
else { did -a nick 1 $read($1,%x) }
inc %x
}
}
try it tell me results
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
2300 lines for a channel central script? Does it cook too?
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
Not quite though it does have heaps of oper stuff in it.
|
|
|
|
Joined: Jan 2003
Posts: 38
Ameglian cow
|
Ameglian cow
Joined: Jan 2003
Posts: 38 |
$wrap works fine for me in dialogs, but i dont know about editboxes (if i think i know what it is ) $wrap(text, font, [font]size, width(pixels), [word,] N) Returns Nth line in text wrapped to the specified width in pixels. //echo -a $wrap(hejhoppjaheterkalle,arial,9,30,[1/0,]1)echos: "hejhop" and if you switch the last number (red) //echo -a $wrap(hejhoppjaheterkalle,arial,9,30,[1/0,]2)it echos the next line: "pjahet" and so on... //echo -a $wrap(hejhoppjaheterkalle,arial,9,30,[1/0,]3)echos: "erkalle" The [1/0] is for wrapping at whole words, since i dont have any in my text (hejhoppjaheterkalle) it isnt needed but you can add it anyway, default is 1, wrap at whole words, but it works bothways in my example I think i got it to echo all the lines at once one time, dont remember how though. anyways.. gl with your scripting, this wont help very much, i just gave you an example
|
|
|
|
|