mIRC Home    About    Download    Register    News    Help

Page 2 of 2 < 1 2
Topic Options
#194823 - 12/02/08 02:19 AM Re: inserting spaces [Re: Reaper]
foshizzle Offline
Fjord artisan

Registered: 20/08/07
Posts: 333
Loc: Silicon Valley
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:
Quote:

blah
blah
blah

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

Top
#194824 - 12/02/08 02:30 AM Re: inserting spaces [Re: foshizzle]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
/help $gettok
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#194825 - 12/02/08 02:48 AM Re: inserting spaces [Re: foshizzle]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.

Top
#194827 - 12/02/08 03:38 AM Re: inserting spaces [Re: starbucks_mafia]
foshizzle Offline
Fjord artisan

Registered: 20/08/07
Posts: 333
Loc: Silicon Valley
i got the wrapping working.. thx a lot
but how about the custom created new lines(separate lines)


Edited by foshizzle (12/02/08 03:47 AM)
_________________________
This is not the signature you are looking for

Top
#194856 - 12/02/08 10:50 PM Re: inserting spaces [Re: foshizzle]
hixxy Offline
Hoopy frood

Registered: 06/09/05
Posts: 2876
No sense. You are making.

Top
#194860 - 12/02/08 11:29 PM Re: inserting spaces [Re: foshizzle]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.

Top
#194861 - 12/02/08 11:43 PM Re: inserting spaces [Re: starbucks_mafia]
foshizzle Offline
Fjord artisan

Registered: 20/08/07
Posts: 333
Loc: Silicon Valley
ie: enter key
_________________________
This is not the signature you are looking for

Top
#194885 - 13/02/08 06:38 PM Re: inserting spaces [Re: foshizzle]
Sais Offline
Fjord artisan

Registered: 07/10/03
Posts: 313
Loc: UK
Originally Posted By: Starbuck's Mafia
...in more detail...


(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

Top
#194897 - 13/02/08 08:13 PM Re: inserting spaces [Re: Sais]
foshizzle Offline
Fjord artisan

Registered: 20/08/07
Posts: 333
Loc: Silicon Valley
?, if you dont think im asking good questions, dont post anything
_________________________
This is not the signature you are looking for

Top
#194899 - 13/02/08 08:22 PM Re: inserting spaces [Re: foshizzle]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.

Top
#194901 - 13/02/08 10:34 PM Re: inserting spaces [Re: starbucks_mafia]
foshizzle Offline
Fjord artisan

Registered: 20/08/07
Posts: 333
Loc: Silicon Valley
edit: nvm


Edited by foshizzle (13/02/08 11:12 PM)
_________________________
This is not the signature you are looking for

Top
Page 2 of 2 < 1 2