|
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
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
as i had said a while back, i was trying to create a custom edit text box feature... so... im creating a little picwin with a sticky note feature in it(like a little version of notepad.exe) but i dont know how to correctly place new lines in, i know how to space them apart but how do i separate the string into different variables or tokens and put those onto the lines(im using the paragraph (¶) symbol in my text to achieve this). how do i separate those(tokenize is an option) but then how do I put those onto separate lines... ex: my text is blah¶blah¶blah should look like: i want each line to be set as a token or a variable... but i dont know how to do that..
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
As argv[0] said, you can use $gettok() to split that text at each pilcrow (¶ symbol) and loop through them. If each tokenised peice of text might be long then you may need an additional loop inside that one looping through $wrap() in the way I demonstrated a few posts up.
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 got the wrapping working.. thx a lot but how about the custom created new lines(separate lines)
Last edited by foshizzle; 12/02/08 03:47 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 |
No sense. You are making.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
I don't know what you mean. Adding any new lines using /drawtext is all based on the same principle I demonstrated earlier. ie. Take the height of the line and multiply it by (n - 1) where n is the line number.
If you want to overwrite lines then you simply erase the previous text using /drawrect with the background colour.
Other than that, you'll have to explain in more detail what you mean.
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 |
This is not the signature you are looking for
|
|
|
|
Joined: Oct 2003
Posts: 313
Fjord artisan
|
Fjord artisan
Joined: Oct 2003
Posts: 313 |
(You really sound like a troll, rather than someone who can't quite express themselves. If you don't want that image, you might like to read: http://catb.org/~esr/faqs/smart-questions.html . I would really recommend it to everyone - askers and answerers alike)
Sais
|
|
|
|
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
|
OP
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334 |
?, if you dont think im asking good questions, dont post anything
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 |
It isn't necessarily the questions you're asking, it's how you ask them. This thread is now approaching 30 posts and I'm still not sure what you're asking for. In the last post I made I asked you to be more specific and you gave me a three word response. You can't keep expecting people to bend over backwards to figure out what you're saying. In at least one post you wrote clearly and coherently so you're obviously capable of asking questions properly, but in just about every other post it almost seems like you're giving deliberately cryptic responses.
Your last post was "ie: enter key". What about the enter key is the problem? The enter key just adds a new line, we've already established how you figure out where the next line down would be, so what exactly is the problem you're having with the enter key?
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 |
edit: nvm
Last edited by foshizzle; 13/02/08 11:12 PM.
This is not the signature you are looking for
|
|
|
|
|