| View previous topic :: View next topic |
| Author |
Message |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Thu Dec 25, 2008 10:17 am Post subject: [C++] macro formula? |
|
|
Whats the macro formula? is it
| Code: | lines = split(richTextBox1.text, "\n");
foreach(line in lines)
{
if(line = "command")
{
function();
}
}
|
or what?
_________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Dec 25, 2008 10:35 am Post subject: |
|
|
The algorithm you use totally depends on the way you want to do it.
_________________
|
|
| Back to top |
|
 |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Thu Dec 25, 2008 10:38 am Post subject: |
|
|
I want to split a richtextbox into lines and then search for commands and split the line that the command is on by whatever, like " " or "," or whatever.
_________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Dec 25, 2008 10:46 am Post subject: |
|
|
So split each line like that by Line new line feed bytes.
In each line search for a keyword, when u find it, split the string (after the command) for comma bytes and use those for w/e.
_________________
|
|
| Back to top |
|
 |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Thu Dec 25, 2008 10:48 am Post subject: |
|
|
I knew that, just not how .... D: its the holidays man
_________________
| qwerty147 wrote: |
| ghostonline wrote: |
what world are you in?
|
bera
but i live in NZ
|
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Thu Dec 25, 2008 10:57 am Post subject: |
|
|
| ElectroFusion wrote: | | I knew that, just not how .... D: its the holidays man |
Didn't meg already send you a snippet to split up your richtextbox and loop through the lines?
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Dec 25, 2008 11:03 am Post subject: |
|
|
| ElectroFusion wrote: | | I knew that, just not how .... D: its the holidays man |
No excuse. Go learn. Google. Search. Make an effort.
_________________
|
|
| Back to top |
|
 |
|