|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
im trying to create my own custom edit box.. how would i include spaces in it
and how would i simulate word wrapping
This is not the signature you are looking for
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
You really have to try harder to make your posts clearer, almost all your posts are way too short and convey a feeling that you just can't be bothered to explain properly and give details. Assuming you're talking about picture windows: For the spaces issue, use any of the workarounds suggested here. As for word wrapping, /help $wrap
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
sorry.. i ment wrapping in picwins too and i wanted to create my own version of a rich edit text box
This is not the signature you are looking for
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
well i didnt understand that article very much.. but i did figure out another way to do it, so thx anyway..
but onto the next thing... what is a simple formula to create multiples(etc. line numbers and knowing how to space them correctly) like: i want the bar to be drawn at 39 if the line == 1 and 100 if its 2 and so on(random numbers)
Last edited by foshizzle; 11/02/08 12:23 AM.
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
As before, you need to explain better what you want. I *think* you're talking about multiple characters repeating, such as "a" repeating 100 times (or spaces repeating that many). If so, see /help $str . If not, please explain better.
For rich edit, use DCX.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
not $str.. and im using picwins.. i wanted to use it for drawing text at a current position resembling different lines
ex: draw blah on line 1(10y) draw blah on line 2(25y) so on so forth ... you get what i mean? yes? no? maybe so?
This is not the signature you are looking for
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Use $width() to figure out where you need to wrap text. Use $height() to get line heights.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
i get that but how about the factors and how would i break up the string of text into dif lines
Last edited by foshizzle; 11/02/08 02:14 AM.
This is not the signature you are looking for
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
i get that but how about the factors and how would i break up the string of text into dif lines qwerty already told you: /help $wrap
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
that still doesnt tell me how to do factoring
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Nobody knows what you mean by factoring. Here's a simple example of how you might do it: ; Setup variables
var %text = THIS IS THE TEXT TO BE DISPLAYED
var %fontname = FONT NAME HERE
var %fontsize = FONT SIZE HERE
var %width = THIS IS THE WIDTH THE TEXT NEEDS TO FIT IN
var %window = THE PICWIN YOU WANT TO DRAW ON
var %color = A $RGB() VALUE OF THE TEXT COLOUR
; End of setup variables
var %lines = $wrap(%text, %fontname, %fontsize, %width, 0)
var %height = $height(%text, %fontname, %fontsize)
var %i = 1
while %i <= %lines {
drawtext -r %window %color $qt(%fontname) %fontsize 0 $calc(%height * (%i -1)) $wrap(%text, %fontname, %fontsize, %width, %i)
inc %i
}
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
nvm but what i was saying.. how do u create a while loop to create infanite number of lines.. and put the certain text on the certain line what do i add to to incorporate new lines into this(¶ is a new line) -- using a string as my text.. i need to separate each line and write it to a new position but idk how to do that var %tex = $regsubex($hget(Note [ $+ [ $1 ] ],Text),/\—/gSi, $chr(32)),%i = 1
$iif(%tex, drawtext -pn $1 $3 verdana 12 5 $calc(12 + 12 * %i) %tex, halt)
Last edited by foshizzle; 12/02/08 01:05 AM.
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
In a picwin? Have you looked at the commands for picwins? At all?
And...this _inifinite_ number of lines in a while loop - you're just going to create an infinite loop, aren't you? Unless you're clever about it, you're going to lock mIRC up.
Oh. The help has the commands for picture windows: /help Picture Windows
And more specifically for your question: /help /drawtext
[edit] And how many questions are you trying to ask at once? [/edit]
Last edited by Sais; 12/02/08 01:33 AM.
Sais
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
did u read any of what i had said earlier?
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
All of it....before you edited it
Last edited by Sais; 12/02/08 01:37 AM.
Sais
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
@ foshizzle:
It is my humble opinion that you need to stop posting on this board until you learn how to communicate your thoughts coherently and completely. Put away your keyboard, go to a book store, pick up a book on English grammar, and don't come back until you finish it.
Regards.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
Sais, then if you know so much, help me. Don't give me a link that does not have to do anything with what I was talking about.
is that better Argv0?
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
When I answered, you had posted only:
"but what i was saying.. how do u create a while loop to create infanite number of lines.. and put the certain text on the certain line"
And that has nothing to do with the additional edit you made that I can discern.
P.S. There was never any claim of knowledge. I just tried to decipher your question as best I could, and it suggested you hadn't read the help file. (See also my comment below)
Last edited by Sais; 12/02/08 02:25 AM.
Sais
|
|
|
|
Joined: Aug 2006
Posts: 19
Pikka bird
|
Pikka bird
Joined: Aug 2006
Posts: 19 |
i dont know what you are trying to create but to me you are not making any sense. what is this script supposed to do? i mean we cant help you unless you tell us what the script is supposed to do and what you are trying to create with this script. i mean you are just asking us random questions and not telling us what you are trying to create. basically be specific in what you need help with. i dont like having to guess plus you can find most stuff in the help file. we are here to help you understand stuff in the help file. we are not here to quote you every line in the help file. basically read the help file before posting questions because you will find most your answers there. just ask specific questions about what you need.
ReaperIRC Killgore Computers
|
|
|
|
|