|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
i was wondering if there is a way to have a text box with scroll feature. in my dialog i want to have it so if i have tabs for info on diff things(sorta like a help system), i want to be able to enter the text and have a scroll bar for when it exceeds the veiwing area so ppl can scroll up or down..
is this possible?
|
|
|
|
Joined: Dec 2002
Posts: 788
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 788 |
You would use something like: edit "",14, 11 25 90 60, multi vsbar returnWhich creates an editbox with multiple lines and a vertical scroll bar where 'return' will goto the nextline. i.e. The following uses mIRC's helpfile example to include tabs. dialog test { title "mIRC" size -1 -1 110 100 option dbu
tab "m", 1, 5 5 100 90 tab "I", 2 tab "R", 3 tab "C", 4
button "m is for ... ", 11, 30 50 50 24, ok tab 1 button "I is for Internet", 12, 30 50 50 24, tab 2 button "R is for Relay", 13, 30 50 50 24, tab 3 edit "",14, 11 25 90 60, multi vsbar return tab 4 }
Places the editbox on the 4th tab. To add contents to the editbox, when the dialog opens you can use something like; On *:dialog:test:Init:*:{ did -a $dname 14 A $+ $crlf $+ B $+ $crlf $+ C $+ $crlf $+ D $+ $crlf $+ E $+ $crlf $+ F $+ $crlf $+ G $+ $crlf $+ H $+ $crlf $+ I $+ $crlf $+ J }
Where, the $crlf is basically a new line, the above makes A-J appear in the box all on differnet lines. Eamonn.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hi,
wouldn't something like didtok $dname 14 32 A B C D E F G H I J be simpler, and give better overview than using crlf's?
Or maybe did -a $dname 14 $replace(A B C D E F G H I J,$chr(32),$crlf)
Anyway, you probably didn't want to make it too complex for the requester, which is why you did it the "manual" way, I suppose.
Greets
Gone.
|
|
|
|
Joined: Dec 2002
Posts: 788
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 788 |
Yup they would both work perfectly fine for my example, although you would need to use something other than $chr(32 ) since that would mean they wouldnt be able to have spaces in their text Eamonn.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Yeah I know :tongue:
I'll usually use ctrl+o or some other char that can't be in a string anyway. Makes it less messy cuz you don't need $+ ' s, unless your dealing with variables/identifiers of course, hehe.
didtok $dname 14 15 A BC D E FG H IJ
Anyway, we're on the same page here, cya around!
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
thank you guys very much! both strings work good but i'm gonna go with the didtok string. it's cleaner no in the mirc help file where can i find info on the hot keys so i can lookup what ctrl +o is and what it does.. i've search but couldn't find it.. or a alternative source maybe??.,.... anyways thanks a bunch!!! and i know this is repeated a billion times(but never sunk in till now) the mirc help file is your friend... lol, it's true- till next question bye
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
Hi, you're welcome. The ctrl+o thing: hold ctrl, and press o (thats an o not a zero) It's called a "shift in" and is represented by ascii number 15. You can see it also by doing //echo -a $chr(15). In mIRC, ctrl+o inserts a control code for plain text, but since you're tokenizing on that string, it has no meaning then, and is only used as a means to achieve something. /help control codes The reason ctrl+o is good, is because the odds that you will use them in a string, or in any incoming string is almost nihil, unlike a space $chr(32), so that you'll be sure that the tokenized params are filled with the right contents. I'd even prefer using $lf or $cr, but then you need the $+ identifiers to paste text together, which you don't with the shift in. Note that there are more chars that can be used, I just happen to use this one often, hehe. This probably doesn't make much sense to you, so just consider it as a handy trick Btw if you're interested to see the ASCII chars with their according decimal values: ascii table Greets
Last edited by FiberOPtics; 20/08/04 06:10 PM.
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
ok now i have another question..... i've looked up in the mirc help the control code(s).... but, now when i try to use the ctrl+b code it doesn't appear as bold in the dialog..??? any thoughts why this is.. all i see is two control marks (i'm guessing thats what they are) but i want to make like one word out of the text bold.. is there a trick to it?
|
|
|
|
Joined: Dec 2002
Posts: 788
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 788 |
There is no trick, mIRC dialogs do not support colour codes.
Eamonn.
|
|
|
|
Joined: Feb 2004
Posts: 2,019
Hoopy frood
|
Hoopy frood
Joined: Feb 2004
Posts: 2,019 |
That's normal behaviour.
mIRC won't translate the color codes in the edit box. I'm afraid there's no way to do with the built-in commands. You're probably going to have to look for a .dll to do this for you. Perhaps mdx.dll can do it, haven't checked.
Greets
Gone.
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
okay, i see ... i have read something about the color codes and not able to use'em in dialog.. i just didn't realize bold was one of'em..
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
is there a way to have the text from a .txt file load in the edit box, instead of having fifty billion lines of text code??? i'm trying to ref the mirc help and this is what i've got so far ... if ($scriptdir) && (isfile(help.txt) {
$read(help.txt,w) $dname 7 }
else echo -s FILE DOES NOT EXIST $dname
i know i'm not close to it at all(but just to show i'm trying ) if anyone would be nice as to lend a word of help or advice. thanks
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
loadbuf $lines($mircdir\texst.txt) -o $dname ID $mircdir\texst.txt and load it to a list .. that would help you "i hope"
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
wholy cow that was a fast response!....
i'll give it a try.....
thanks
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
just remember to set the "list" as the ID u send the loadbuf to.. then it would work just fine..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
okay now what does this mean??
/loadbuf: unable to open 'C:\PROGRAM'
this is what came up when i used that code any thoughts?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
u have the file in "program files/mirc" ?
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
yes it's in c:\program files\mirc
does that make if big difference?
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
try use:
$lines(" $+ $mircdir\texst.txt $+ ") -o $dname ID " $+ $mircdir\texst.txt $+ "
and see if that helps
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2004
Posts: 423
Fjord artisan
|
OP
Fjord artisan
Joined: Aug 2004
Posts: 423 |
now it's saying this: /loadbuf: invalid parameters (line 73, script2.ini)
|
|
|
|
|