mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#194823 12/02/08 02:19 AM
Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
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..

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
/help $gettok

Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
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.

Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
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.
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
No sense. You are making.

Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
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.

Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
ie: enter key

Joined: Oct 2003
Posts: 284
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 284
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 #194897 13/02/08 08:13 PM
Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
?, if you dont think im asking good questions, dont post anything

Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
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?

Joined: Aug 2007
Posts: 331
F
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
F
Joined: Aug 2007
Posts: 331
edit: nvm

Last edited by foshizzle; 13/02/08 11:12 PM.
Page 2 of 2 1 2

Link Copied to Clipboard