mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Reaper #194823 12/02/08 02:19 AM
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
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:
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
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
/help $gettok


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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 Offline
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
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
No sense. You are making.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
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 Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
ie: enter key


This is not the signature you are looking for
Joined: Oct 2003
Posts: 313
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
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
Sais #194897 13/02/08 08:13 PM
Joined: Aug 2007
Posts: 334
Pan-dimensional mouse
OP Offline
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
S
Hoopy frood
Offline
Hoopy frood
S
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 Offline
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
Page 2 of 2 1 2

Link Copied to Clipboard