Post
by Captive » Sat Mar 24, 2007 8:53 pm
Pickles!
One way to approach this task is to start by creating some rough logic on what the code would do.
Starting from position 1.
Let>k=1
Loop through (start at 1, see Repeat/Until, or Goto/Label).....
- Check if the character at position1 is uppercase.
(There are probably a few ways to so this. One is using vbscript;
Let>YourLetter={Copy(Phrase,k,1)}
VBEval>Asc("%YourLetter%"),asciiresult
(I thought there was a simple command for this but now can't find it)
Then see if "asciiresult" is between the number for A and Z. (A=65, B=66, etc)
- If it is A-Z, then you either need the next "space" from your position to the end, of if there are no more spaces, you're probably and the end word. Remove appropriate section of text, repeat loop if you're not at the end.
..or
- If not A-Z, add 1, then repeat loop if you're not at the end.
Before you do "continue the loop", make sure k will still be equal or longer than the phrase.
The entire thing could be done with a nice VBScript routine, but that involves getting deeper into vbscript. :]