mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
inserting spaces #194722 10/02/08 04:26 PM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: inserting spaces [Re: foshizzle] #194723 10/02/08 04:56 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
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
Re: inserting spaces [Re: qwerty] #194725 10/02/08 05:03 PM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: inserting spaces [Re: foshizzle] #194742 11/02/08 12:12 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: inserting spaces [Re: foshizzle] #194744 11/02/08 12:51 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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
Re: inserting spaces [Re: Riamus2] #194746 11/02/08 01:01 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: inserting spaces [Re: foshizzle] #194748 11/02/08 01:49 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
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.
Re: inserting spaces [Re: starbucks_mafia] #194749 11/02/08 02:12 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: inserting spaces [Re: foshizzle] #194788 11/02/08 09:10 PM
Joined: Sep 2005
Posts: 2,881
H
hixxy Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Originally Posted By: foshizzle
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

Re: inserting spaces [Re: hixxy] #194789 11/02/08 09:37 PM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
that still doesnt tell me how to do factoring


This is not the signature you are looking for
Re: inserting spaces [Re: foshizzle] #194795 11/02/08 10:03 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Factoring what?


Invision Support
#Invision on irc.irchighway.net
Re: inserting spaces [Re: foshizzle] #194798 11/02/08 10:30 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Nobody knows what you mean by factoring.

Here's a simple example of how you might do it:
Code:
; 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.
Re: inserting spaces [Re: starbucks_mafia] #194814 12/02/08 12:53 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Code:
   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
Re: inserting spaces [Re: foshizzle] #194815 12/02/08 01:05 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
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
Re: inserting spaces [Re: Sais] #194816 12/02/08 01:06 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
did u read any of what i had said earlier?


This is not the signature you are looking for
Re: inserting spaces [Re: foshizzle] #194817 12/02/08 01:07 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
All of it....before you edited it

Last edited by Sais; 12/02/08 01:37 AM.

Sais
Re: inserting spaces [Re: foshizzle] #194818 12/02/08 01:11 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
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"
Re: inserting spaces [Re: argv0] #194819 12/02/08 01:17 AM
Joined: Aug 2007
Posts: 333
foshizzle Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Aug 2007
Posts: 333
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
Re: inserting spaces [Re: foshizzle] #194820 12/02/08 01:21 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
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
Re: inserting spaces [Re: Sais] #194822 12/02/08 01:49 AM
Joined: Aug 2006
Posts: 19
R
Reaper Offline
Pikka bird
Offline
Pikka bird
R
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
Page 1 of 2 1 2